You are here

protected function PanelizerTestTrait::assertDefaultNotExists in Panelizer 8.5

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

Asserts that a Panelizer default does not exist.

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: The default ID.

File

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

Class

PanelizerTestTrait
Contains helper methods for writing functional tests of Panelizer.

Namespace

Drupal\Tests\panelizer\Functional

Code

protected function assertDefaultNotExists($content_type = 'page', $display = 'default', $id = 'default') {
  $settings = \Drupal::service('entity_display.repository')
    ->getViewDisplay('node', $content_type, $display)
    ->getThirdPartySettings('panelizer');
  $display_exists = isset($settings['displays'][$id]);
  $this
    ->assertFalse($display_exists);
}