public function CollapseActionTest::setUp in Collapsiblock 4.x
Same name and namespace in other branches
- 3.x tests/src/FunctionalJavascript/CollapseActionTest.php \Drupal\Tests\collapsiblock\FunctionalJavascript\CollapseActionTest::setUp()
Overrides CollapsiblockJavaScriptTestBase::setUp
File
- tests/
src/ FunctionalJavascript/ CollapseActionTest.php, line 43
Class
- CollapseActionTest
- Test that collapse actions work as-intended.
Namespace
Drupal\Tests\collapsiblock\FunctionalJavascriptCode
public function setUp() : void {
parent::setUp();
$this->collapsiblockTestBlock = $this
->drupalPlaceBlock('system_powered_by_block', [
'label_display' => TRUE,
]);
$this->collapsiblockTestBlockHtmlId = 'block-' . $this->collapsiblockTestBlock
->id();
$this->collapsiblockTestBlockTitleXpath = $this
->assertSession()
->buildXPathQuery('//*[@id=:blockId]//h2', [
':blockId' => $this->collapsiblockTestBlockHtmlId,
]);
$this->collapsiblockTestBlockContentXpath = $this
->assertSession()
->buildXPathQuery('//*[@id=:blockId]//span', [
':blockId' => $this->collapsiblockTestBlockHtmlId,
]);
}