You are here

public function RabbitHoleBehaviorPluginTest::testPageRedirectPlugin 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::testPageRedirectPlugin()

Test the page redirect plugin to the frontpage.

File

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

Class

RabbitHoleBehaviorPluginTest
Test the functionality of the RabbitHoleBehavior plugin.

Namespace

Drupal\Tests\rabbit_hole\Functional

Code

public function testPageRedirectPlugin() {

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

  // Check that the plugin performs the expected action.
  // TODO: Check that $plugin->performAction() does what it's supposed to,
  // whatever that is.
}