You are here

public function HumansTxtBasicTest::testHumansTxtUserNoAccess in Humans.txt 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/HumansTxtBasicTest.php \Drupal\Tests\humanstxt\Functional\HumansTxtBasicTest::testHumansTxtUserNoAccess()

Checks if a non-administrative user cannot access to the config page.

File

tests/src/Functional/HumansTxtBasicTest.php, line 67

Class

HumansTxtBasicTest
Tests basic functionality of configured humans.txt files.

Namespace

Drupal\Tests\humanstxt\Functional

Code

public function testHumansTxtUserNoAccess() {
  $this
    ->drupalGet('/admin/config/development/humanstxt');
  $this
    ->assertResponse(403);
  $this
    ->drupalLogin($this->normalUser);
  $this
    ->drupalGet('/admin/config/development/humanstxt');
  $this
    ->assertResponse(403);
}