Class CookieWrapperTest.
More...
◆ setUpBeforeClass()
static ILIAS\HTTP\Cookies\CookieJarWrapperTest::setUpBeforeClass |
( |
| ) |
|
|
static |
Definition at line 48 of file CookieJarWrapperTest.php.
48 : void
49 {
50 parent::setUpBeforeClass();
51 self::$cookieFactory = new CookieFactoryImpl();
52 self::$cookieJarFactory = new CookieJarFactoryImpl();
53 }
◆ testWithDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieJarWrapperTest::testWithDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 57 of file CookieJarWrapperTest.php.
57 : void
58 {
59 $cookieName = "YummyCookie";
60 $cookieValue = "MilkAndChocolate";
61 $cookie = self::$cookieFactory->create($cookieName, $cookieValue);
62 $cookieJar = self::$cookieJarFactory->fromCookieStrings([]);
63
64 $newCookieJar = $cookieJar->with($cookie);
65
66 $this->assertFalse($cookieJar->has($cookieName));
67 $this->assertTrue($newCookieJar->has($cookieName));
68
69 $this->assertNotEquals($cookieJar, $newCookieJar);
70 }
◆ testWithoutDoesNotChangeTheCurrentObject()
ILIAS\HTTP\Cookies\CookieJarWrapperTest::testWithoutDoesNotChangeTheCurrentObject |
( |
| ) |
|
Definition at line 74 of file CookieJarWrapperTest.php.
74 : void
75 {
76 $cookieName = "YummyCookie";
77 $cookieValue = "MilkAndChocolate";
78
79
80 $cookieJar = self::$cookieJarFactory->fromCookieStrings([ $cookieName . '=' . $cookieValue . ';' ]);
81
82
83 $newCookieJar = $cookieJar->without($cookieName);
84
85
86 $this->assertTrue($cookieJar->has($cookieName));
87
88
89 $this->assertFalse($newCookieJar->has($cookieName));
90
91
92 $this->assertNotEquals($cookieJar, $newCookieJar);
93 }
◆ $cookieFactory
◆ $cookieJarFactory
The documentation for this class was generated from the following file: