class BigPipeIdenticalPlaceholdersTest
Tests multiple occurrences of the same placeholder.
Attributes
#[Group('big_pipe')]
#[RunTestsInSeparateProcesses]
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase extends \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\big_pipe\FunctionalJavascript\BigPipeIdenticalPlaceholdersTest extends \Drupal\FunctionalJavascriptTests\WebDriverTestBase
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of BigPipeIdenticalPlaceholdersTest
File
-
core/
modules/ big_pipe/ tests/ src/ FunctionalJavascript/ BigPipeIdenticalPlaceholdersTest.php, line 15
Namespace
Drupal\Tests\big_pipe\FunctionalJavascriptView source
class BigPipeIdenticalPlaceholdersTest extends WebDriverTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'big_pipe',
'big_pipe_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'big_pipe_test_theme';
/**
* Tests that all occurrences of the same placeholder are replaced.
*/
public function testIdenticalPlaceholders() : void {
$this->drupalLogin($this->drupalCreateUser());
$assert_session = $this->assertSession();
$this->drupalGet(Url::fromRoute('big_pipe_test_multi_occurrence'));
$this->assertNotNull($assert_session->waitForElement('css', 'script[data-big-pipe-event="stop"]'));
$assert_session->elementsCount('css', 'p.multiple-occurrence-instance', 3);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.