protected function StandardJavascriptTest::assertBigPipePlaceholderReplacementCount in Drupal 8
Same name and namespace in other branches
- 9 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()
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) {
$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]'));
}