public function SearchPageOverrideTest::testSearchPageHook in Drupal 10
Same name and namespace in other branches
- 8 core/modules/search/tests/src/Functional/SearchPageOverrideTest.php \Drupal\Tests\search\Functional\SearchPageOverrideTest::testSearchPageHook()
- 9 core/modules/search/tests/src/Functional/SearchPageOverrideTest.php \Drupal\Tests\search\Functional\SearchPageOverrideTest::testSearchPageHook()
File
- core/
modules/ search/ tests/ src/ Functional/ SearchPageOverrideTest.php, line 45
Class
- SearchPageOverrideTest
- Tests if the result page can be overridden.
Namespace
Drupal\Tests\search\FunctionalCode
public function testSearchPageHook() {
$keys = 'bike shed ' . $this
->randomMachineName();
$this
->drupalGet("search/dummy_path", [
'query' => [
'keys' => $keys,
],
]);
$this
->assertSession()
->pageTextContains('Dummy search snippet');
$this
->assertSession()
->pageTextContains('Test page text is here');
}