You are here

public function RabbitHoleBehaviorPluginTest::testDisplayPagePlugin in Rabbit Hole 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/RabbitHoleBehaviorPluginTest.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorPluginTest::testDisplayPagePlugin()

Test the display page plugin.

File

tests/src/Functional/RabbitHoleBehaviorPluginTest.php, line 105

Class

RabbitHoleBehaviorPluginTest
Test the functionality of the RabbitHoleBehavior plugin.

Namespace

Drupal\Tests\rabbit_hole\Functional

Code

public function testDisplayPagePlugin() {

  // Check we can create an instance of the plugin.
  $plugin = $this->manager
    ->createInstance('display_page', [
    'of' => 'configuration values',
  ]);
  $this
    ->assertInstanceOf(DisplayPage::class, $plugin, 'The display page plugin is the correct type.');

  // Check that the plugin performs the expected action.
  $this
    ->assertEmpty($plugin
    ->performAction($this->entity));
}