You are here

protected function SearchConfigSettingsFormTest::assertDefaultSearch in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::assertDefaultSearch()

Checks that the default search page matches expectations.

Parameters

string $expected: The expected search page.

string $message: (optional) A message to display with the assertion.

string $group: (optional) The group this message is in.

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 418

Class

SearchConfigSettingsFormTest
Verify the search config settings form.

Namespace

Drupal\Tests\search\Functional

Code

protected function assertDefaultSearch($expected, $message = '', $group = 'Other') {

  /** @var \Drupal\search\SearchPageRepositoryInterface $search_page_repository */
  $search_page_repository = \Drupal::service('search.search_page_repository');
  $this
    ->assertSame($expected, $search_page_repository
    ->getDefaultSearchPage(), $message, $group);
}