private function LayoutBuilderAccessTest::assertExpectedAccess in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php \Drupal\Tests\layout_builder\Functional\LayoutBuilderAccessTest::assertExpectedAccess()
Asserts the correct response code is returned based on expected access.
Parameters
bool $expected_access: The expected access.
2 calls to LayoutBuilderAccessTest::assertExpectedAccess()
- LayoutBuilderAccessTest::testAccessWithBundles in core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderAccessTest.php - Tests Layout Builder access for an entity type that has bundles.
- LayoutBuilderAccessTest::testAccessWithoutBundles in core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderAccessTest.php - Tests Layout Builder access for an entity type that does not have bundles.
File
- core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderAccessTest.php, line 244
Class
- LayoutBuilderAccessTest
- Tests access to Layout Builder.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
private function assertExpectedAccess($expected_access) {
$expected_status_code = $expected_access ? 200 : 403;
$this
->assertSession()
->statusCodeEquals($expected_status_code);
}