You are here

protected function OverviewPageTest::checkOverviewPermissions in Search API 8

Tests that the overview has the correct permissions set.

1 call to OverviewPageTest::checkOverviewPermissions()
OverviewPageTest::testOverviewPage in tests/src/Functional/OverviewPageTest.php
Tests various scenarios for the overview page.

File

tests/src/Functional/OverviewPageTest.php, line 228

Class

OverviewPageTest
Tests the Search API overview page.

Namespace

Drupal\Tests\search_api\Functional

Code

protected function checkOverviewPermissions() {
  $this
    ->drupalGet('admin/config');
  $this
    ->assertSession()
    ->pageTextContains('Search API');
  $this
    ->drupalGet($this->overviewPageUrl);
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalLogin($this->unauthorizedUser);
  $this
    ->drupalGet($this->overviewPageUrl);
  $this
    ->assertSession()
    ->statusCodeEquals(403);
}