function BigPipeTest::assertCookieExists
Same name in other branches
- 9 core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::assertCookieExists()
- 8.9.x core/modules/big_pipe/tests/src/Functional/BigPipeTest.php \Drupal\Tests\big_pipe\Functional\BigPipeTest::assertCookieExists()
- 10 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.
@internal
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 504
Class
- BigPipeTest
- Tests BigPipe's no-JS detection & response delivery (with and without JS).
Namespace
Drupal\Tests\big_pipe\FunctionalCode
protected function assertCookieExists(string $cookie_name, string $expected, string $cookie_label) : void {
$this->assertEquals($expected, !empty($this->getSession()
->getCookie($cookie_name)), $expected ? "{$cookie_label} cookie exists." : "{$cookie_label} cookie does not exist.");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.