drupalCreateUser(array('administer blocks', 'administer themes')); $this->drupalLogin($admin_user); $new_theme = 'bartik'; \Drupal::service('theme_handler')->install(array($new_theme)); $this->drupalGet('admin/structure/block/list/' . $new_theme); $this->assertText('Bartik(' . t('active tab') . ')', 'Tab for non-default theme found.'); } }