You are here

protected function SearchConfigSettingsFormTest::assertDefaultSearch in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/search/src/Tests/SearchConfigSettingsFormTest.php \Drupal\search\Tests\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/src/Tests/SearchConfigSettingsFormTest.php
Tests multiple search pages of the same type.

File

core/modules/search/src/Tests/SearchConfigSettingsFormTest.php, line 374
Contains \Drupal\search\Tests\SearchConfigSettingsFormTest.

Class

SearchConfigSettingsFormTest
Verify the search config settings form.

Namespace

Drupal\search\Tests

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