Commit 7351845e by Franz Liedke

Fix PHP errors in test cases related to changed cookie data storage.

parent feefa8d9
......@@ -69,7 +69,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase {
{
Cookie::forever('foo', 'bar');
$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);
$this->assertEquals('path', Cookie::$jar['bar']['path']);
......@@ -84,11 +84,11 @@ class CookieTest extends \PHPUnit_Framework_TestCase {
*/
public function testForgetSetsCookieWithExpiration()
{
Cookie::forget('bar', 'path', 'domain', true);
$this->assertEquals(-2000, Cookie::$jar['bar']['minutes']);
Cookie::forget('bar', 'path', 'domain');
$this->assertEquals(-2000, Cookie::$jar['bar']['expiration']);
$this->assertEquals('path', Cookie::$jar['bar']['path']);
$this->assertEquals('domain', Cookie::$jar['bar']['domain']);
$this->assertTrue(Cookie::$jar['bar']['secure']);
$this->assertFalse(Cookie::$jar['bar']['secure']);
}
}
\ No newline at end of file
......@@ -373,7 +373,7 @@ class SessionTest extends PHPUnit_Framework_TestCase {
$cookie = Cookie::$jar[Config::get('session.cookie')];
$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.path'), $cookie['path']);
$this->assertEquals(Config::get('session.secure'), $cookie['secure']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment