public function LayoutSectionTest::testLayoutDeletingBundle in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php \Drupal\Tests\layout_builder\Functional\LayoutSectionTest::testLayoutDeletingBundle()
Tests that deleting a bundle removes the layout.
File
- core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutSectionTest.php, line 269
Class
- LayoutSectionTest
- Tests the rendering of a layout section field.
Namespace
Drupal\Tests\layout_builder\FunctionalCode
public function testLayoutDeletingBundle() {
$assert_session = $this
->assertSession();
$display = LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default');
$this
->assertInstanceOf(LayoutBuilderEntityViewDisplay::class, $display);
$this
->drupalGet('/admin/structure/types/manage/bundle_with_section_field/delete');
$this
->submitForm([], 'Delete');
$assert_session
->statusCodeEquals(200);
$display = LayoutBuilderEntityViewDisplay::load('node.bundle_with_section_field.default');
$this
->assertNull($display);
}