function StandardJavascriptTest::assertBigPipePlaceholderReplacementCount
Same name in other branches
- 8.9.x core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php \Drupal\Tests\standard\FunctionalJavascript\StandardJavascriptTest::assertBigPipePlaceholderReplacementCount()
- 10 core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php \Drupal\Tests\standard\FunctionalJavascript\StandardJavascriptTest::assertBigPipePlaceholderReplacementCount()
- 11.x core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php \Drupal\Tests\standard\FunctionalJavascript\StandardJavascriptTest::assertBigPipePlaceholderReplacementCount()
Asserts the number of BigPipe placeholders that are replaced on the page.
Parameters
int $expected_count: The expected number of BigPipe placeholders.
1 call to StandardJavascriptTest::assertBigPipePlaceholderReplacementCount()
- StandardJavascriptTest::testBigPipe in core/
profiles/ standard/ tests/ src/ FunctionalJavascript/ StandardJavascriptTest.php - Tests BigPipe accelerates particular Standard installation profile routes.
File
-
core/
profiles/ standard/ tests/ src/ FunctionalJavascript/ StandardJavascriptTest.php, line 53
Class
- StandardJavascriptTest
- Tests Standard installation profile JavaScript expectations.
Namespace
Drupal\Tests\standard\FunctionalJavascriptCode
protected function assertBigPipePlaceholderReplacementCount($expected_count) : void {
$web_assert = $this->assertSession();
$web_assert->waitForElement('css', 'script[data-big-pipe-event="stop"]');
$page = $this->getSession()
->getPage();
$this->assertCount($expected_count, $this->getDrupalSettings()['bigPipePlaceholderIds']);
$this->assertCount($expected_count, $page->findAll('css', 'script[data-big-pipe-replacement-for-placeholder-with-id]'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.