function PathWorkspacesTest::assertAccessiblePaths

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php \Drupal\Tests\workspaces\Functional\PathWorkspacesTest::assertAccessiblePaths()
  2. 10 core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php \Drupal\Tests\workspaces\Functional\PathWorkspacesTest::assertAccessiblePaths()
  3. 8.9.x core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php \Drupal\Tests\workspaces\Functional\PathWorkspacesTest::assertAccessiblePaths()

Helper callback to verify paths are responding with status 200.

@internal

Parameters

string[] $paths: An array of paths to check for.

File

core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php, line 311

Class

PathWorkspacesTest
Tests path aliases with workspaces.

Namespace

Drupal\Tests\workspaces\Functional

Code

protected function assertAccessiblePaths(array $paths) : void {
  foreach ($paths as $path) {
    $this->drupalGet($path);
    $this->assertSession()
      ->statusCodeEquals(200);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.