@@ -88,7 +88,7 @@ public function testNegativeExpirationIsNotPossible()
88
88
89
89
$ this ->assertSame (0 , $ cookie ->getExpiresTime ());
90
90
91
- $ cookie = Cookie::create ('foo ' , 'bar ' )->withExpiresTime (-100 );
91
+ $ cookie = Cookie::create ('foo ' , 'bar ' )->withExpires (-100 );
92
92
93
93
$ this ->assertSame (0 , $ cookie ->getExpiresTime ());
94
94
}
@@ -118,7 +118,7 @@ public function testGetExpiresTime()
118
118
119
119
$ this ->assertEquals ($ expire , $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date ' );
120
120
121
- $ cookie = Cookie::create ('foo ' )->withExpiresTime ($ expire = time () + 3600 );
121
+ $ cookie = Cookie::create ('foo ' )->withExpires ($ expire = time () + 3600 );
122
122
123
123
$ this ->assertEquals ($ expire , $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date ' );
124
124
}
@@ -129,7 +129,7 @@ public function testGetExpiresTimeIsCastToInt()
129
129
130
130
$ this ->assertSame (3600 , $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date as an integer ' );
131
131
132
- $ cookie = Cookie::create ('foo ' )->withExpiresTime (3600.6 );
132
+ $ cookie = Cookie::create ('foo ' )->withExpires (3600.6 );
133
133
134
134
$ this ->assertSame (3600 , $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date as an integer ' );
135
135
}
@@ -141,7 +141,7 @@ public function testConstructorWithDateTime()
141
141
142
142
$ this ->assertEquals ($ expire ->format ('U ' ), $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date ' );
143
143
144
- $ cookie = Cookie::create ('foo ' )->withExpiresTime ($ expire );
144
+ $ cookie = Cookie::create ('foo ' )->withExpires ($ expire );
145
145
146
146
$ this ->assertEquals ($ expire ->format ('U ' ), $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date ' );
147
147
}
@@ -153,7 +153,7 @@ public function testConstructorWithDateTimeImmutable()
153
153
154
154
$ this ->assertEquals ($ expire ->format ('U ' ), $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date ' );
155
155
156
- $ cookie = Cookie::create ('foo ' )->withValue ('bar ' )->withExpiresTime ($ expire );
156
+ $ cookie = Cookie::create ('foo ' )->withValue ('bar ' )->withExpires ($ expire );
157
157
158
158
$ this ->assertEquals ($ expire ->format ('U ' ), $ cookie ->getExpiresTime (), '->getExpiresTime() returns the expire date ' );
159
159
}
@@ -167,7 +167,7 @@ public function testGetExpiresTimeWithStringValue()
167
167
168
168
$ this ->assertEqualsWithDelta ($ expire , $ cookie ->getExpiresTime (), 1 , '->getExpiresTime() returns the expire date ' );
169
169
170
- $ cookie = Cookie::create ('foo ' )->withValue ('bar ' )->withExpiresTime ($ value );
170
+ $ cookie = Cookie::create ('foo ' )->withValue ('bar ' )->withExpires ($ value );
171
171
172
172
$ this ->assertEqualsWithDelta ($ expire , $ cookie ->getExpiresTime (), 1 , '->getExpiresTime() returns the expire date ' );
173
173
}
@@ -211,7 +211,7 @@ public function testCookieIsNotCleared()
211
211
212
212
$ this ->assertFalse ($ cookie ->isCleared (), '->isCleared() returns false if the cookie did not expire yet ' );
213
213
214
- $ cookie = Cookie::create ('foo ' )->withExpiresTime (time () + 3600 * 24 );
214
+ $ cookie = Cookie::create ('foo ' )->withExpires (time () + 3600 * 24 );
215
215
216
216
$ this ->assertFalse ($ cookie ->isCleared (), '->isCleared() returns false if the cookie did not expire yet ' );
217
217
}
@@ -222,7 +222,7 @@ public function testCookieIsCleared()
222
222
223
223
$ this ->assertTrue ($ cookie ->isCleared (), '->isCleared() returns true if the cookie has expired ' );
224
224
225
- $ cookie = Cookie::create ('foo ' )->withExpiresTime (time () - 20 );
225
+ $ cookie = Cookie::create ('foo ' )->withExpires (time () - 20 );
226
226
227
227
$ this ->assertTrue ($ cookie ->isCleared (), '->isCleared() returns true if the cookie has expired ' );
228
228
@@ -238,7 +238,7 @@ public function testCookieIsCleared()
238
238
239
239
$ this ->assertFalse ($ cookie ->isCleared ());
240
240
241
- $ cookie = Cookie::create ('foo ' )->withExpiresTime (-1 );
241
+ $ cookie = Cookie::create ('foo ' )->withExpires (-1 );
242
242
243
243
$ this ->assertFalse ($ cookie ->isCleared ());
244
244
}
@@ -251,7 +251,7 @@ public function testToString()
251
251
252
252
$ cookie = Cookie::create ('foo ' )
253
253
->withValue ('bar ' )
254
- ->withExpiresTime (strtotime ('Fri, 20-May-2011 15:25:52 GMT ' ))
254
+ ->withExpires (strtotime ('Fri, 20-May-2011 15:25:52 GMT ' ))
255
255
->withDomain ('.myfoodomain.com ' )
256
256
->withSecure (true )
257
257
->withSameSite (null );
@@ -263,7 +263,7 @@ public function testToString()
263
263
264
264
$ cookie = Cookie::create ('foo ' )
265
265
->withValue ('bar with white spaces ' )
266
- ->withExpiresTime (strtotime ('Fri, 20-May-2011 15:25:52 GMT ' ))
266
+ ->withExpires (strtotime ('Fri, 20-May-2011 15:25:52 GMT ' ))
267
267
->withDomain ('.myfoodomain.com ' )
268
268
->withSecure (true )
269
269
->withSameSite (null );
@@ -274,7 +274,7 @@ public function testToString()
274
274
$ this ->assertEquals ($ expected , (string ) $ cookie , '->__toString() returns string representation of a cleared cookie if value is NULL ' );
275
275
276
276
$ cookie = Cookie::create ('foo ' )
277
- ->withExpiresTime (1 )
277
+ ->withExpires (1 )
278
278
->withPath ('/admin/ ' )
279
279
->withDomain ('.myfoodomain.com ' )
280
280
->withSameSite (null );
0 commit comments