You are here

public function CookieJarTest::testAllValues in Zircon Profile 8

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

@dataProvider provideAllValuesValues

File

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

Class

CookieJarTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

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');
}