You are here

public function CookieJarTest::testClear 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::testClear()

File

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

Class

CookieJarTest

Namespace

Symfony\Component\BrowserKit\Tests

Code

public function testClear() {
  $cookieJar = new CookieJar();
  $cookieJar
    ->set($cookie1 = new Cookie('foo', 'bar'));
  $cookieJar
    ->set($cookie2 = new Cookie('bar', 'foo'));
  $cookieJar
    ->clear();
  $this
    ->assertEquals(array(), $cookieJar
    ->all(), '->clear() expires all cookies');
}