|
@@ -79,7 +79,8 @@ class CookieJarTest extends \PHPUnit_Framework_TestCase
|
|
|
$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_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');
|
|
@@ -88,11 +89,13 @@ class CookieJarTest extends \PHPUnit_Framework_TestCase
|
|
|
public function provideAllValuesValues()
|
|
|
{
|
|
|
return array(
|
|
|
+ array('http://www.example.com', array('foo_nothing', 'foo_domain')),
|
|
|
array('http://www.example.com/', array('foo_nothing', 'foo_domain')),
|
|
|
array('http://foo.example.com/', array('foo_nothing', 'foo_domain')),
|
|
|
array('http://foo.example1.com/', array('foo_nothing')),
|
|
|
array('https://foo.example.com/', array('foo_nothing', 'foo_domain', 'foo_secure')),
|
|
|
array('http://www.example.com/foo/bar', array('foo_nothing', 'foo_path', 'foo_domain')),
|
|
|
+ array('http://www4.example.com/', array('foo_nothing', 'foo_domain', 'foo_strict_domain')),
|
|
|
);
|
|
|
}
|
|
|
}
|