3 namespace Drupal\block\Tests;
5 use Drupal\simpletest\WebTestBase;
8 * Tests the block administration page for a non-default theme.
12 class NonDefaultBlockAdminTest extends WebTestBase {
19 public static $modules = ['block'];
24 protected function setUp() {
27 $this->drupalPlaceBlock('local_tasks_block');
31 * Test non-default theme admin.
33 public function testNonDefaultBlockAdmin() {
34 $admin_user = $this->drupalCreateUser(['administer blocks', 'administer themes']);
35 $this->drupalLogin($admin_user);
36 $new_theme = 'bartik';
37 \Drupal::service('theme_handler')->install([$new_theme]);
38 $this->drupalGet('admin/structure/block/list/' . $new_theme);
39 $this->assertText('Bartik(' . t('active tab') . ')', 'Tab for non-default theme found.');