You are here

function SearchPageOverrideTest::testSearchPageHook in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/search/src/Tests/SearchPageOverrideTest.php \Drupal\search\Tests\SearchPageOverrideTest::testSearchPageHook()

File

core/modules/search/src/Tests/SearchPageOverrideTest.php, line 42
Contains \Drupal\search\Tests\SearchPageOverrideTest.

Class

SearchPageOverrideTest
Tests if the result page can be overridden.

Namespace

Drupal\search\Tests

Code

function testSearchPageHook() {
  $keys = 'bike shed ' . $this
    ->randomMachineName();
  $this
    ->drupalGet("search/dummy_path", array(
    'query' => array(
      'keys' => $keys,
    ),
  ));
  $this
    ->assertText('Dummy search snippet', 'Dummy search snippet is shown');
  $this
    ->assertText('Test page text is here', 'Page override is working');
}