You are here

protected function SearchConfigSettingsFormTest::assertDefaultSearch in Drupal 8

Same name and namespace in other branches
  1. 9 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 408

Class

SearchConfigSettingsFormTest
Verify the search config settings form.

Namespace

Drupal\Tests\search\Functional

Code

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

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