You are here

public function AccessThemeBrowserTest::testEditAdminTheme in Theme permission 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Functional/AccessThemeBrowserTest.php \Drupal\Tests\theme_permission\Functional\AccessThemeBrowserTest::testEditAdminTheme()

Check if the user accesses "Edit Administration theme".

File

tests/src/Functional/AccessThemeBrowserTest.php, line 37

Class

AccessThemeBrowserTest
Administration theme access check.

Namespace

Drupal\Tests\theme_permission\Functional

Code

public function testEditAdminTheme() {
  $this
    ->userLogin([
    'Edit Administration theme',
  ]);
  $this
    ->drupalGet(Url::fromRoute('system.themes_page'));
  $this
    ->assertSession()
    ->pageTextContains('Choose "Default theme" to always use the same theme as the rest of the site.');
}