NonDefaultBlockAdminTest.php in Zircon Profile 8.0
File
core/modules/block/src/Tests/NonDefaultBlockAdminTest.php
View source
<?php
namespace Drupal\block\Tests;
use Drupal\simpletest\WebTestBase;
class NonDefaultBlockAdminTest extends WebTestBase {
public static $modules = array(
'block',
);
protected function setUp() {
parent::setUp();
$this
->drupalPlaceBlock('local_tasks_block');
}
function testNonDefaultBlockAdmin() {
$admin_user = $this
->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.');
}
}