Newer
Older
Lee Rowlands
committed
namespace Drupal\Tests\block\Functional;
Lee Rowlands
committed
use Drupal\Tests\BrowserTestBase;
/**
* Tests the block administration page for a non-default theme.
*
* @group block
Lee Rowlands
committed
class NonDefaultBlockAdminTest extends BrowserTestBase {
/**
Jennifer Hodgdon
committed
* Modules to install.
*
* @var array
*/
public static $modules = ['block'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->drupalPlaceBlock('local_tasks_block');
}
/**
* Test non-default theme admin.
*/
public function testNonDefaultBlockAdmin() {
$admin_user = $this->drupalCreateUser(['administer blocks', 'administer themes']);
$this->drupalLogin($admin_user);
$new_theme = 'bartik';
\Drupal::service('theme_handler')->install([$new_theme]);
Angie Byron
committed
$this->drupalGet('admin/structure/block/list/' . $new_theme);
Dries Buytaert
committed
$this->assertText('Bartik(' . t('active tab') . ')', 'Tab for non-default theme found.');