Browse Source

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

Franz Liedke 12 years ago
parent
commit
7351845ec3
2 changed files with 5 additions and 5 deletions
  1. 4 4
      laravel/tests/cases/cookie.test.php
  2. 1 1
      laravel/tests/cases/session.test.php

+ 4 - 4
laravel/tests/cases/cookie.test.php

@@ -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']);
 	}
 
 }

+ 1 - 1
laravel/tests/cases/session.test.php

@@ -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']);