Class CookieWrapperTest.
More...
◆ setUp()
ILIAS\HTTP\Cookies\CookieWrapperTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 58 of file CookieWrapperTest.php.
63 $cookieName =
"ilias";
64 $cookieValue =
"theNewCookiesAreYummy";
65 $this->cookie = self::$cookieFactory->create($cookieName, $cookieValue);
◆ setUpBeforeClass()
static ILIAS\HTTP\Cookies\CookieWrapperTest::setUpBeforeClass |
( |
| ) |
|
|
static |
Definition at line 51 of file CookieWrapperTest.php.
53 parent::setUpBeforeClass();
54 self::$cookieFactory =
new CookieFactoryImpl();
◆ testExpireDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testExpireDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 101 of file CookieWrapperTest.php.
103 $newCookie = $this->cookie->expire();
106 $this->assertNotSame($this->cookie->getExpires(), $newCookie->getExpires());
◆ testRememberForeverDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testRememberForeverDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 91 of file CookieWrapperTest.php.
93 $newCookie = $this->cookie->rememberForLongTime();
96 $this->assertNotSame($this->cookie->getExpires(), $newCookie->getExpires());
◆ testWithDomainDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testWithDomainDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 133 of file CookieWrapperTest.php.
135 $domain =
'ilias.de';
136 $newCookie = $this->cookie->withDomain($domain);
138 $this->assertSame($domain, $newCookie->getDomain());
139 $this->assertNotEquals($this->cookie->getDomain(), $newCookie->getDomain());
◆ testWithExpiresDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testWithExpiresDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 80 of file CookieWrapperTest.php.
83 $newCookie = $this->cookie->withExpires($expires);
85 $this->assertSame($expires, $newCookie->getExpires());
86 $this->assertNotSame($this->cookie->getExpires(), $newCookie->getExpires());
◆ testWithHttpOnlyDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testWithHttpOnlyDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 155 of file CookieWrapperTest.php.
158 $newCookie = $this->cookie->withHttpOnly($httpOnly);
160 $this->assertTrue($newCookie->getHttpOnly());
161 $this->assertNotSame($this->cookie->getHttpOnly(), $newCookie->getHttpOnly());
◆ testWithMaxAgeDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testWithMaxAgeDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 111 of file CookieWrapperTest.php.
114 $newCookie = $this->cookie->withMaxAge($maxAge);
116 $this->assertSame($maxAge, $newCookie->getMaxAge());
117 $this->assertNotSame($this->cookie->getMaxAge(), $newCookie->getMaxAge());
◆ testWithPathDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testWithPathDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 122 of file CookieWrapperTest.php.
References $path.
125 $newCookie = $this->cookie->withPath(
$path);
127 $this->assertSame(
$path, $newCookie->getPath());
128 $this->assertNotEquals($this->cookie->getPath(), $newCookie->getPath());
◆ testWithSecureDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testWithSecureDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 144 of file CookieWrapperTest.php.
147 $newCookie = $this->cookie->withSecure($secure);
149 $this->assertTrue($newCookie->getSecure());
150 $this->assertNotSame($this->cookie->getSecure(), $newCookie->getSecure());
◆ testWithValueDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieWrapperTest::testWithValueDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 70 of file CookieWrapperTest.php.
73 $newCookie = $this->cookie->withValue(
"yes!");
74 $this->assertSame($newValue, $newCookie->getValue());
75 $this->assertNotEquals($this->cookie->getValue(), $newCookie->getValue());
◆ $cookie
◆ $cookieFactory
The documentation for this class was generated from the following file: