You are here

protected function SettingsTrayTest::getBlockSelector in Drupal 9

Same name and namespace in other branches
  1. 8 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();
}