function NavigationSafeBlockDefinitionTest::testNavigationBlocksHiddenInBlockLayout
Tests logic to exclude blocks in Block Layout UI.
File
-
core/
modules/ navigation/ tests/ src/ Functional/ NavigationSafeBlockDefinitionTest.php, line 80
Class
- NavigationSafeBlockDefinitionTest
- Tests the definition of navigation safe blocks.
Namespace
Drupal\Tests\navigation\FunctionalCode
public function testNavigationBlocksHiddenInBlockLayout() : void {
$block_url = '/admin/structure/block';
$this->drupalGet($block_url);
$this->clickLink('Place block');
$this->assertSession()
->linkByHrefNotExists('/admin/structure/block/add/navigation_menu%3Aadmin/stark');
$this->assertSession()
->linkByHrefNotExists('/admin/structure/block/add/navigation_menu%3Acontent/stark');
$this->assertSession()
->linkByHrefNotExists('/admin/structure/block/add/navigation_shortcuts/stark');
$this->assertSession()
->linkByHrefNotExists('/admin/structure/block/add/navigation_user/stark');
$this->assertSession()
->linkByHrefNotExists('/admin/structure/block/add/navigation_link/stark');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.