db backup prior to drupal security update
[yaffs-website] / web / core / modules / block / src / Tests / NonDefaultBlockAdminTest.php
1 <?php
2
3 namespace Drupal\block\Tests;
4
5 use Drupal\simpletest\WebTestBase;
6
7 /**
8  * Tests the block administration page for a non-default theme.
9  *
10  * @group block
11  */
12 class NonDefaultBlockAdminTest extends WebTestBase {
13
14   /**
15    * Modules to install.
16    *
17    * @var array
18    */
19   public static $modules = ['block'];
20
21   /**
22    * {@inheritdoc}
23    */
24   protected function setUp() {
25     parent::setUp();
26
27     $this->drupalPlaceBlock('local_tasks_block');
28   }
29
30   /**
31    * Test non-default theme admin.
32    */
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.');
40   }
41
42 }