function PathContentModerationTest::assertPathsAreAccessible

Same name in other branches
  1. 9 core/modules/path/tests/src/Functional/PathContentModerationTest.php \Drupal\Tests\path\Functional\PathContentModerationTest::assertPathsAreAccessible()
  2. 10 core/modules/path/tests/src/Functional/PathContentModerationTest.php \Drupal\Tests\path\Functional\PathContentModerationTest::assertPathsAreAccessible()
  3. 11.x 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 231

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);
    }
}

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