You are here

protected function GridStackTestTrait::verifyPages in GridStack 8

Same name and namespace in other branches
  1. 8.2 tests/src/Traits/GridStackTestTrait.php \Drupal\Tests\gridstack\Traits\GridStackTestTrait::verifyPages()

Verifies the logged in user has access to the various pages.

Parameters

array $pages: The array of pages we want to test.

int $response: (optional) An HTTP response code. Defaults to 200.

File

tests/src/Traits/GridStackTestTrait.php, line 18

Class

GridStackTestTrait
A Trait common for GridStack tests.

Namespace

Drupal\Tests\gridstack\Traits

Code

protected function verifyPages(array $pages = [], $response = 200) {
  foreach ($pages as $page) {
    $this
      ->drupalGet($page);
    $this
      ->assertSession()
      ->statusCodeEquals($response);
  }
}