function PluginTypeExampleTest::testPluginExamplePage

Same name and namespace in other branches
  1. 4.0.x modules/plugin_type_example/tests/src/Functional/PluginTypeExampleTest.php \Drupal\Tests\plugin_type_example\Functional\PluginTypeExampleTest::testPluginExamplePage()

Test the output of the example page.

File

modules/plugin_type_example/tests/src/Functional/PluginTypeExampleTest.php, line 74

Class

PluginTypeExampleTest
Test the functionality of the Plugin Type Example module.

Namespace

Drupal\Tests\plugin_type_example\Functional

Code

public function testPluginExamplePage() {
  $assert = $this->assertSession();
  $this->drupalGet('examples/plugin-type-example');
  $assert->statusCodeEquals(200);
  // Check we see the plugin id.
  // The plugin ID was not output.
  $assert->pageTextContains('ham_sandwich');
  // Check we see the plugin description.
  // The plugin description was not output.
  $assert->pageTextContains('Ham, mustard, rocket, sun-dried tomatoes.');
}