1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-25 10:33:18 +01:00

Fixing inconsistent test dealing with cookie expiration timestamps. Addresses #474

This commit is contained in:
Michael Dowling 2013-11-21 12:02:50 -08:00
parent 695a0d42e2
commit 8a99fafe81

View File

@ -273,9 +273,9 @@ class CookieParserProvider extends \Guzzle\Tests\GuzzleTestCase
foreach ((array) $cookie as $c) {
$p = $parser->parseCookie($c, $host, $path);
// Remove expires values from the assertion if they are relatively equal
// Remove expires values from the assertion if they are relatively equal by allowing a 5 minute difference
if ($p['expires'] != $parsed['expires']) {
if (abs($p['expires'] - $parsed['expires']) < 20) {
if (abs($p['expires'] - $parsed['expires']) < 300) {
unset($p['expires']);
unset($parsed['expires']);
}