@@ -206,11 +206,12 @@ public function assertLocation($uri)
206
206
*
207
207
* @param string $cookieName
208
208
* @param mixed $value
209
+ * @param bool $unserialize
209
210
* @return $this
210
211
*/
211
- public function assertPlainCookie ($ cookieName , $ value = null )
212
+ public function assertPlainCookie ($ cookieName , $ value = null , $ unserialize = false )
212
213
{
213
- $ this ->assertCookie ($ cookieName , $ value , false );
214
+ $ this ->assertCookie ($ cookieName , $ value , false , $ unserialize );
214
215
215
216
return $ this ;
216
217
}
@@ -221,9 +222,10 @@ public function assertPlainCookie($cookieName, $value = null)
221
222
* @param string $cookieName
222
223
* @param mixed $value
223
224
* @param bool $encrypted
225
+ * @param bool $unserialize
224
226
* @return $this
225
227
*/
226
- public function assertCookie ($ cookieName , $ value = null , $ encrypted = true )
228
+ public function assertCookie ($ cookieName , $ value = null , $ encrypted = true , $ unserialize = false )
227
229
{
228
230
PHPUnit::assertNotNull (
229
231
$ cookie = $ this ->getCookie ($ cookieName ),
@@ -237,7 +239,7 @@ public function assertCookie($cookieName, $value = null, $encrypted = true)
237
239
$ cookieValue = $ cookie ->getValue ();
238
240
239
241
$ actual = $ encrypted
240
- ? app ('encrypter ' )->decrypt ($ cookieValue ) : $ cookieValue ;
242
+ ? app ('encrypter ' )->decrypt ($ cookieValue, $ unserialize ) : $ cookieValue ;
241
243
242
244
PHPUnit::assertEquals (
243
245
$ value , $ actual ,
0 commit comments