You are here

protected function SearchConfigSettingsFormTest::assertDefaultSearch in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::assertDefaultSearch()
  2. 9 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.

File

core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php, line 419

Class

SearchConfigSettingsFormTest
Verify the search config settings form.

Namespace

Drupal\Tests\search\Functional

Code

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);
}