You are here

public function BrowserTest::testCookieDoesNotBleed in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/Tests/BrowserTest.php \Drupal\simpletest\Tests\BrowserTest::testCookieDoesNotBleed()

Tests that the cookies from a previous test do not bleed into a new test.

See also

static::testCookies()

File

core/modules/simpletest/src/Tests/BrowserTest.php, line 125
Contains \Drupal\simpletest\Tests\BrowserTest.

Class

BrowserTest
Tests the internal browser of the testing framework.

Namespace

Drupal\simpletest\Tests

Code

public function testCookieDoesNotBleed() {

  // In order for this test to be effective it should always run after the
  // testCookies() test.
  $this
    ->assertTrue(static::$cookieSet, 'Tests have been executed in the expected order.');
  $this
    ->assertEqual(count($this->cookies), 0, 'No cookies are present at the start of a new test.');
}