function SearchConfigSettingsFormTest::assertDefaultSearch
Same name in other branches
- 9 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::assertDefaultSearch()
- 8.9.x core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::assertDefaultSearch()
- 11.x core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::assertDefaultSearch()
Checks that the default search page matches expectations.
@internal
Parameters
string|false $expected: The expected search page.
string $message: (optional) A message to display with the assertion.
1 call to SearchConfigSettingsFormTest::assertDefaultSearch()
- SearchConfigSettingsFormTest::testMultipleSearchPages in core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php - Tests multiple search pages of the same type.
File
-
core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php, line 425
Class
- SearchConfigSettingsFormTest
- Verify the search config settings form.
Namespace
Drupal\Tests\search\FunctionalCode
protected function assertDefaultSearch($expected, string $message = '') : void {
/** @var \Drupal\search\SearchPageRepositoryInterface $search_page_repository */
$search_page_repository = \Drupal::service('search.search_page_repository');
$this->assertSame($expected, $search_page_repository->getDefaultSearchPage(), $message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.