Fix PHP errors in test cases related to changed cookie data storage.
This commit is contained in:
@@ -69,7 +69,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase {
|
|||||||
{
|
{
|
||||||
Cookie::forever('foo', 'bar');
|
Cookie::forever('foo', 'bar');
|
||||||
$this->assertEquals('bar', Cookie::$jar['foo']['value']);
|
$this->assertEquals('bar', Cookie::$jar['foo']['value']);
|
||||||
$this->assertEquals(525600, Cookie::$jar['foo']['minutes']);
|
$this->assertEquals(525600, Cookie::$jar['foo']['expiration']);
|
||||||
|
|
||||||
Cookie::forever('bar', 'baz', 'path', 'domain', true);
|
Cookie::forever('bar', 'baz', 'path', 'domain', true);
|
||||||
$this->assertEquals('path', Cookie::$jar['bar']['path']);
|
$this->assertEquals('path', Cookie::$jar['bar']['path']);
|
||||||
@@ -84,11 +84,11 @@ class CookieTest extends \PHPUnit_Framework_TestCase {
|
|||||||
*/
|
*/
|
||||||
public function testForgetSetsCookieWithExpiration()
|
public function testForgetSetsCookieWithExpiration()
|
||||||
{
|
{
|
||||||
Cookie::forget('bar', 'path', 'domain', true);
|
Cookie::forget('bar', 'path', 'domain');
|
||||||
$this->assertEquals(-2000, Cookie::$jar['bar']['minutes']);
|
$this->assertEquals(-2000, Cookie::$jar['bar']['expiration']);
|
||||||
$this->assertEquals('path', Cookie::$jar['bar']['path']);
|
$this->assertEquals('path', Cookie::$jar['bar']['path']);
|
||||||
$this->assertEquals('domain', Cookie::$jar['bar']['domain']);
|
$this->assertEquals('domain', Cookie::$jar['bar']['domain']);
|
||||||
$this->assertTrue(Cookie::$jar['bar']['secure']);
|
$this->assertFalse(Cookie::$jar['bar']['secure']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -373,7 +373,7 @@ class SessionTest extends PHPUnit_Framework_TestCase {
|
|||||||
$cookie = Cookie::$jar[Config::get('session.cookie')];
|
$cookie = Cookie::$jar[Config::get('session.cookie')];
|
||||||
|
|
||||||
$this->assertEquals('foo', $cookie['value']);
|
$this->assertEquals('foo', $cookie['value']);
|
||||||
$this->assertEquals(Config::get('session.lifetime'), $cookie['minutes']);
|
$this->assertEquals(Config::get('session.lifetime'), $cookie['expiration']);
|
||||||
$this->assertEquals(Config::get('session.domain'), $cookie['domain']);
|
$this->assertEquals(Config::get('session.domain'), $cookie['domain']);
|
||||||
$this->assertEquals(Config::get('session.path'), $cookie['path']);
|
$this->assertEquals(Config::get('session.path'), $cookie['path']);
|
||||||
$this->assertEquals(Config::get('session.secure'), $cookie['secure']);
|
$this->assertEquals(Config::get('session.secure'), $cookie['secure']);
|
||||||
|
|||||||
Reference in New Issue
Block a user