You are here

public function BlockTest::testThemeAdminLink in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/src/Tests/BlockTest.php \Drupal\block\Tests\BlockTest::testThemeAdminLink()

Tests that a link exists to block layout from the appearance form.

File

core/modules/block/src/Tests/BlockTest.php, line 419
Contains \Drupal\block\Tests\BlockTest.

Class

BlockTest
Tests basic block functionality.

Namespace

Drupal\block\Tests

Code

public function testThemeAdminLink() {
  $this
    ->drupalPlaceBlock('help_block', [
    'region' => 'help',
  ]);
  $theme_admin = $this
    ->drupalCreateUser([
    'administer blocks',
    'administer themes',
    'access administration pages',
  ]);
  $this
    ->drupalLogin($theme_admin);
  $this
    ->drupalGet('admin/appearance');
  $this
    ->assertText('You can place blocks for each theme on the block layout page');
  $this
    ->assertLinkByHref('admin/structure/block');
}