diff --git a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module index 323af16..2d6ec48 100644 --- a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module +++ b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module @@ -45,5 +45,20 @@ function toolbar_test_toolbar() { '#weight' => 50, ]; + $items['testing-tab-only'] = array( + '#type' => 'toolbar_item', + 'tab' => array( + '#type' => 'link', + '#title' => t('Test tab without tray'), + '#url' => Url::fromRoute(''), + '#options' => array( + 'attributes' => array( + 'id' => 'toolbar-tab-without-a-tray-testing', + 'title' => t('Test tab has no tray'), + ), + ), + ), + ); + return $items; } diff --git a/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php b/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php index f3d3ce6..a126075 100644 --- a/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php +++ b/core/modules/toolbar/tests/src/Functional/ToolbarHookToolbarTest.php @@ -54,6 +54,12 @@ public function testHookToolbar() { // Assert that tray item descriptions are present. $this->assertRaw('title="Test link 1 title"'); + + // Assert that the tab registered by toolbar_test is present. + $this->assertRaw('id="toolbar-tab-without-a-tray-testing"'); + + // Assert that the tab item descriptions are present. + $this->assertRaw('title="Test tab has no tray"'); } }