protected function BigPipeTest::assertCookieExists in Drupal 8
Same name and namespace in other branches
- 9 core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::assertCookieExists()
Asserts whether a cookie exists on the client or not.
2 calls to BigPipeTest::assertCookieExists()
- BigPipeTest::assertBigPipeNoJsCookieExists in core/
modules/ big_pipe/ tests/ src/ Functional/ BigPipeTest.php - Asserts whether a BigPipe no-JS cookie exists or not.
- BigPipeTest::assertSessionCookieExists in core/
modules/ big_pipe/ tests/ src/ Functional/ BigPipeTest.php - Asserts whether a session cookie exists or not.
File
- core/
modules/ big_pipe/ tests/ src/ Functional/ BigPipeTest.php, line 459
Class
- BigPipeTest
- Tests BigPipe's no-JS detection & response delivery (with and without JS).
Namespace
Drupal\Tests\big_pipe\FunctionalCode
protected function assertCookieExists($cookie_name, $expected, $cookie_label) {
$this
->assertEqual($expected, !empty($this
->getSession()
->getCookie($cookie_name)), $expected ? "{$cookie_label} cookie exists." : "{$cookie_label} cookie does not exist.");
}