public function LayoutSectionTest::testLayoutUrlNoSectionField in Drupal 8
Same name and namespace in other branches
- 9 core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php \Drupal\Tests\layout_builder\Functional\LayoutSectionTest::testLayoutUrlNoSectionField()
- 10 core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php \Drupal\Tests\layout_builder\Functional\LayoutSectionTest::testLayoutUrlNoSectionField()
Tests that no Layout link shows without a section field.
File
- core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutSectionTest.php, line 226
Class
- LayoutSectionTest
- Tests the rendering of a layout section field.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
public function testLayoutUrlNoSectionField() {
$node = $this
->createNode([
'type' => 'bundle_without_section_field',
'title' => 'The node title',
'body' => [
[
'value' => 'The node body',
],
],
]);
$node
->save();
$this
->drupalGet($node
->toUrl('canonical')
->toString() . '/layout');
$this
->assertSession()
->statusCodeEquals(404);
}