You are here

protected function PanelizerTestTrait::deletePanelizerDefault in Panelizer 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Functional/PanelizerTestTrait.php \Drupal\Tests\panelizer\Functional\PanelizerTestTrait::deletePanelizerDefault()

Deletes a Panelizer default.

Parameters

string $content_type: The content type, i.e. the node bundle ID, to configure; defaults to 'page'.

string $display: (optional) The view mode to work on.

string $id: (optional) The default ID.

File

tests/src/Functional/PanelizerTestTrait.php, line 192

Class

PanelizerTestTrait
Contains helper methods for writing functional tests of Panelizer.

Namespace

Drupal\Tests\panelizer\Functional

Code

protected function deletePanelizerDefault($content_type = 'page', $display = 'default', $id = 'default') {
  $this
    ->drupalGet("admin/structure/panelizer/delete/node__{$content_type}__{$display}__{$id}");
  $this
    ->assertResponse(200);
  $this
    ->submitForm([], 'Confirm');
  $this
    ->assertResponse(200);
}