public function NonDefaultBlockAdminTest::testNonDefaultBlockAdmin in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php \Drupal\Tests\block\Functional\NonDefaultBlockAdminTest::testNonDefaultBlockAdmin()
- 10 core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php \Drupal\Tests\block\Functional\NonDefaultBlockAdminTest::testNonDefaultBlockAdmin()
Tests non-default theme admin.
File
- core/
modules/ block/ tests/ src/ Functional/ NonDefaultBlockAdminTest.php, line 38
Class
- NonDefaultBlockAdminTest
- Tests the block administration page for a non-default theme.
Namespace
Drupal\Tests\block\FunctionalCode
public function testNonDefaultBlockAdmin() {
$admin_user = $this
->drupalCreateUser([
'administer blocks',
'administer themes',
]);
$this
->drupalLogin($admin_user);
$new_theme = 'bartik';
\Drupal::service('theme_installer')
->install([
$new_theme,
]);
// Ensure that the Bartik tab is shown.
$this
->drupalGet('admin/structure/block/list/' . $new_theme);
$this
->assertSession()
->pageTextContains('Bartik(active tab)');
}