comparison core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Tests\block\Functional;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8 * Tests the block administration page for a non-default theme.
9 *
10 * @group block
11 */
12 class NonDefaultBlockAdminTest extends BrowserTestBase {
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 }