public function StyleguideTest::testStyleguide in Style Guide 8
Same name and namespace in other branches
- 2.x tests/src/Functional/StyleguideTest.php \Drupal\Tests\styleguide\Functional\StyleguideTest::testStyleguide()
Make sure the site works and Styleguite pages are accessible.
File
- tests/
src/ Functional/ StyleguideTest.php, line 27
Class
- StyleguideTest
- Test basic functionality of Styleguide.
Namespace
Drupal\Tests\styleguide\FunctionalCode
public function testStyleguide() {
$this
->drupalGet('/admin/appearance/styleguide');
$this
->assertSession()
->titleEquals('Access denied | Drupal');
$this
->drupalGet('/admin/appearance/styleguide/maintenance-page');
$this
->assertSession()
->titleEquals('Access denied | Drupal');
$account = $this
->drupalCreateUser([
'view style guides',
]);
$this
->drupalLogin($account);
$this
->drupalGet('/admin/appearance/styleguide');
$this
->assertSession()
->titleEquals('Style guide | Drupal');
$this
->assertSession()
->pageTextContains('Showing style guide for Stark');
$this
->drupalGet('/admin/appearance/styleguide/maintenance-page');
$this
->assertSession()
->statusCodeEquals(200);
}