You are here

protected function PanelizerTestTrait::deletePanelizerDefault in Panelizer 8.4

Same name and namespace in other branches
  1. 8.5 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.

1 call to PanelizerTestTrait::deletePanelizerDefault()
PanelizerDefaultsTest::test in tests/src/Functional/PanelizerDefaultsTest.php

File

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

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
    ->drupalPostForm(NULL, [], t('Confirm'));
  $this
    ->assertResponse(200);
}