function SettingsTrayTest::getBlockSelector

Same name and namespace in other branches
  1. 9 core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php \Drupal\Tests\settings_tray\Functional\SettingsTrayTest::getBlockSelector()
  2. 10 core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php \Drupal\Tests\settings_tray\Functional\SettingsTrayTest::getBlockSelector()
  3. 11.x core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php \Drupal\Tests\settings_tray\Functional\SettingsTrayTest::getBlockSelector()

Gets the block CSS selector.

Parameters

\Drupal\block\Entity\Block $block: The block.

Return value

string The CSS selector.

2 calls to SettingsTrayTest::getBlockSelector()
SettingsTrayTest::testOptOut in core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
Tests that certain blocks opt out from Settings Tray.
SettingsTrayTest::testPossibleAnnotations in core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php
Tests the 3 possible forms[settings_tray] annotations: class, FALSE, none.

File

core/modules/settings_tray/tests/src/Functional/SettingsTrayTest.php, line 37

Class

SettingsTrayTest
Tests opening and saving block forms in the off-canvas dialog.

Namespace

Drupal\Tests\settings_tray\Functional

Code

protected function getBlockSelector(Block $block) {
    return '#block-' . $block->id();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.