You are here

public function SettingsFormTest::testIgnoredModulesPagePermissions in Nagios Monitoring 8

Test required permissions for the page 'Ignored modules'.

File

tests/src/Functional/SettingsFormTest.php, line 104

Class

SettingsFormTest
Tests the settings form functionality

Namespace

Drupal\Tests\nagios\Functional

Code

public function testIgnoredModulesPagePermissions() {
  $this
    ->drupalLogin($this->settingsUser);
  $this
    ->drupalGet(self::IGNORED_MODULES_PATH);
  $this
    ->assertSession()
    ->statusCodeEquals(403);
  $this
    ->drupalLogin($this->modulesUser);
  $this
    ->drupalGet(self::IGNORED_MODULES_PATH);
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}