10 require_once(
'./libs/composer/vendor/autoload.php');
37 parent::setUpBeforeClass();
48 $cookieValue =
"theNewCookiesAreYummy";
49 $this->cookie = self::$cookieFactory->create(
$cookieName, $cookieValue);
59 $newCookie = $this->cookie->withValue(
"yes!");
60 $this->assertEquals($newValue, $newCookie->getValue());
61 $this->assertNotEquals($this->cookie->getValue(), $newCookie->getValue());
71 $newCookie = $this->cookie->withExpires($expires);
73 $this->assertEquals($expires, $newCookie->getExpires());
74 $this->assertNotEquals($this->cookie->getExpires(), $newCookie->getExpires());
83 $newCookie = $this->cookie->rememberForLongTime();
86 $this->assertNotEquals($this->cookie->getExpires(), $newCookie->getExpires());
95 $newCookie = $this->cookie->expire();
98 $this->assertNotEquals($this->cookie->getExpires(), $newCookie->getExpires());
108 $newCookie = $this->cookie->withMaxAge($maxAge);
110 $this->assertEquals($maxAge, $newCookie->getMaxAge());
111 $this->assertNotEquals($this->cookie->getMaxAge(), $newCookie->getMaxAge());
121 $newCookie = $this->cookie->withPath(
$path);
123 $this->assertEquals(
$path, $newCookie->getPath());
124 $this->assertNotEquals($this->cookie->getPath(), $newCookie->getPath());
134 $newCookie = $this->cookie->withDomain(
$domain);
136 $this->assertEquals(
$domain, $newCookie->getDomain());
137 $this->assertNotEquals($this->cookie->getDomain(), $newCookie->getDomain());
147 $newCookie = $this->cookie->withSecure($secure);
149 $this->assertTrue($newCookie->getSecure());
150 $this->assertNotEquals($this->cookie->getSecure(), $newCookie->getSecure());
160 $newCookie = $this->cookie->withHttpOnly($httpOnly);
162 $this->assertTrue($newCookie->getHttpOnly());
163 $this->assertNotEquals($this->cookie->getHttpOnly(), $newCookie->getHttpOnly());
testRememberForeverDoesNotChangeTheCurrentObject()
testWithHttpOnlyDoesNotChangeTheCurrentObject()
testExpireDoesNotChangeTheCurrentObject()
testWithExpiresDoesNotChangeTheCurrentObject()
Class CookieJarWrapperTest.
testWithValueDoesNotChangeTheCurrentObject()
testWithSecureDoesNotChangeTheCurrentObject()
testWithDomainDoesNotChangeTheCurrentObject()
testWithPathDoesNotChangeTheCurrentObject()
testWithMaxAgeDoesNotChangeTheCurrentObject()
if(!array_key_exists('domain', $_REQUEST)) $domain
static setUpBeforeClass()