protected function PanelizerTestTrait::unpanelize in Panelizer 8.3
Unpanelizes a node type's default view display.
Panelizer is disabled for the display, but its configuration is retained.
Parameters
string $node_type: The node type ID.
string $display: (optional) The view display to unpanelize.
array $values: (optional) Additional form values.
2 calls to PanelizerTestTrait::unpanelize()
- PanelizerAddDefaultLinkTest::test in src/
Tests/ PanelizerAddDefaultLinkTest.php - PanelizerNodeFunctionalTest::testWizardUI in src/
Tests/ PanelizerNodeFunctionalTest.php - Tests the admin interface to set a default layout for a bundle.
File
- src/
Tests/ PanelizerTestTrait.php, line 52
Class
- PanelizerTestTrait
- Contains helper methods for writing functional tests of Panelizer.
Namespace
Drupal\panelizer\TestsCode
protected function unpanelize($node_type, $display = NULL, array $values = []) {
$this
->drupalGet("admin/structure/types/manage/{$node_type}/display/{$display}");
$this
->assertResponse(200);
$edit = [
'panelizer[enable]' => FALSE,
] + $values;
$this
->drupalPostForm(NULL, $edit, t('Save'));
$this
->assertResponse(200);
EntityFormDisplay::load('node.' . $node_type . '.default')
->removeComponent('panelizer')
->save();
}