File tree 2 files changed +4
-5
lines changed
src/Symfony/Component/BrowserKit
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -213,8 +213,6 @@ private static function parseDate($dateValue)
213
213
if (false !== $ date = date_create ($ dateValue , new \DateTimeZone ('GMT ' ))) {
214
214
return $ date ->format ('U ' );
215
215
}
216
-
217
- throw new \InvalidArgumentException (sprintf ('Could not parse date "%s". ' , $ dateValue ));
218
216
}
219
217
220
218
/**
Original file line number Diff line number Diff line change @@ -88,10 +88,11 @@ public function testFromStringThrowsAnExceptionIfCookieIsNotValid()
88
88
Cookie::fromString ('foo ' );
89
89
}
90
90
91
- public function testFromStringThrowsAnExceptionIfCookieDateIsNotValid ()
91
+ public function testFromStringIgnoresInvalidExpiresDate ()
92
92
{
93
- $ this ->setExpectedException ('InvalidArgumentException ' );
94
- Cookie::fromString ('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT ' );
93
+ $ cookie = Cookie::fromString ('foo=bar; expires=Flursday July 31st 2020, 08:49:37 GMT ' );
94
+
95
+ $ this ->assertFalse ($ cookie ->isExpired ());
95
96
}
96
97
97
98
public function testFromStringThrowsAnExceptionIfUrlIsNotValid ()
You can’t perform that action at this time.
0 commit comments