You are here

public function PathContentModerationTest::assertPathsAreAccessible in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/path/tests/src/Functional/PathContentModerationTest.php \Drupal\Tests\path\Functional\PathContentModerationTest::assertPathsAreAccessible()

Helper callback to verify paths are responding with status 200.

Parameters

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

1 call to PathContentModerationTest::assertPathsAreAccessible()
PathContentModerationTest::testTranslatedModeratedNodeAlias in core/modules/path/tests/src/Functional/PathContentModerationTest.php
Tests that translated and moderated node can get new draft revision.

File

core/modules/path/tests/src/Functional/PathContentModerationTest.php, line 238

Class

PathContentModerationTest
Tests path aliases with Content Moderation.

Namespace

Drupal\Tests\path\Functional

Code

public function assertPathsAreAccessible(array $paths) {
  foreach ($paths as $path) {
    $this
      ->drupalGet($path);
    $this
      ->assertSession()
      ->statusCodeEquals(200);
  }
}