You are here

public function CookieJarTest::testCookieWithWildcardDomain in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/browser-kit/Tests/CookieJarTest.php \Symfony\Component\BrowserKit\Tests\CookieJarTest::testCookieWithWildcardDomain()

File

vendor/symfony/browser-kit/Tests/CookieJarTest.php, line 223

Class

CookieJarTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testCookieWithWildcardDomain() {
  $cookieJar = new CookieJar();
  $cookieJar
    ->set(new Cookie('foo', 'bar', null, '/', '.example.com'));
  $this
    ->assertEquals(array(
    'foo' => 'bar',
  ), $cookieJar
    ->allValues('http://www.example.com'));
  $this
    ->assertEmpty($cookieJar
    ->allValues('http://wwwexample.com'));
}