public function testAllValues($uri,
$values) { $cookieJar =
new CookieJar();
$cookieJar->
set($cookie1 =
new Cookie('foo_nothing', 'foo'
));
$cookieJar->
set($cookie2 =
new Cookie('foo_expired', 'foo',
time() - 86400
));
$cookieJar->
set($cookie3 =
new Cookie('foo_path', 'foo', null, '/foo'
));
$cookieJar->
set($cookie4 =
new Cookie('foo_domain', 'foo', null, '/', '.example.com'
));
$cookieJar->
set($cookie4 =
new Cookie('foo_strict_domain', 'foo', null, '/', '.www4.example.com'
));
$cookieJar->
set($cookie5 =
new Cookie('foo_secure', 'foo', null, '/', '', true
));
$this->
assertEquals($values,
array_keys($cookieJar->
allValues($uri)), '->allValues() returns the cookie for a given URI'
);
} public static function provideAllValuesValues() { return [ ['http://www.example.com',
['foo_nothing', 'foo_domain'
]],
['http://www.example.com/',
['foo_nothing', 'foo_domain'
]],
['http://foo.example.com/',
['foo_nothing', 'foo_domain'
]],
['http://foo.example1.com/',
['foo_nothing'
]],
['https://foo.example.com/',
['foo_nothing', 'foo_secure', 'foo_domain'
]],
['http://www.example.com/foo/bar',
['foo_nothing', 'foo_path', 'foo_domain'
]],
[