protected function PageManagerAdminTest::doTestRemoveVariant in Page Manager 8
Tests removing a variant.
1 call to PageManagerAdminTest::doTestRemoveVariant()
- 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 479 - Contains \Drupal\page_manager_ui\Tests\PageManagerAdminTest.
Class
- PageManagerAdminTest
- Tests the admin UI for page entities.
Namespace
Drupal\page_manager_ui\TestsCode
protected function doTestRemoveVariant() {
$this
->drupalGet('admin/structure/page_manager/manage/foo/page_variant__foo-http_status_code-0__general');
$this
->clickLink('Delete this variant');
$this
->assertRaw('Are you sure you want to delete this variant?');
$this
->drupalPostForm(NULL, [], 'Delete');
$this
->assertRaw(new FormattableMarkup('The variant %label has been removed.', [
'%label' => 'Status Code',
]));
$this
->drupalPostForm(NULL, [], 'Update and save');
}