function SearchPageOverrideTest::testSearchPageHook

File

drupal/core/modules/search/lib/Drupal/search/Tests/SearchPageOverrideTest.php, line 44
Definition of Drupal\search\Tests\SearchPageOverrideTest.

Class

SearchPageOverrideTest
Tests that hook_search_page runs.

Namespace

Drupal\search\Tests

Code

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