function SearchConfigSettingsFormTest::assertDefaultSearch

Same name in other branches
  1. 9 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::assertDefaultSearch()
  2. 10 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::assertDefaultSearch()
  3. 11.x 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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.