protected function PageManagerAdminTest::doTestDeletePage in Page Manager 8
Tests deleting a page.
1 call to PageManagerAdminTest::doTestDeletePage()
- PageManagerAdminTest::testAdmin in page_manager_ui/
src/ Tests/ PageManagerAdminTest.php - Tests the Page Manager admin UI.
File
- page_manager_ui/
src/ Tests/ PageManagerAdminTest.php, line 619 - Contains \Drupal\page_manager_ui\Tests\PageManagerAdminTest.
Class
- PageManagerAdminTest
- Tests the admin UI for page entities.
Namespace
Drupal\page_manager_ui\TestsCode
protected function doTestDeletePage() {
$this
->drupalGet('admin/structure/page_manager');
$this
->clickLink('Delete');
$this
->drupalPostForm(NULL, [], 'Delete');
$this
->assertRaw(new FormattableMarkup('The page %name has been removed.', [
'%name' => 'existing',
]));
$this
->drupalGet('admin');
// The overridden page is back to its default.
$this
->assertResponse(200);
$this
->drupalGet('admin/structure/page_manager');
$this
->clickLink('Delete');
$this
->drupalPostForm(NULL, [], 'Delete');
$this
->assertRaw(new FormattableMarkup('The page %name has been removed.', [
'%name' => 'Foo',
]));
$this
->drupalGet('admin/foo');
// The custom page is no longer found.
$this
->assertResponse(404);
}