function SearchConfigSettingsFormTest::testDefaultSearchPageOrdering
Same name in other branches
- 9 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::testDefaultSearchPageOrdering()
- 10 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::testDefaultSearchPageOrdering()
- 11.x core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::testDefaultSearchPageOrdering()
Tests the ordering of search pages on a clean install.
File
-
core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php, line 240
Class
- SearchConfigSettingsFormTest
- Verify the search config settings form.
Namespace
Drupal\Tests\search\FunctionalCode
public function testDefaultSearchPageOrdering() {
$this->drupalGet('search');
$elements = $this->xpath('//*[contains(@class, :class)]//a', [
':class' => 'tabs primary',
]);
$this->assertIdentical($elements[0]->getAttribute('href'), Url::fromRoute('search.view_node_search')->toString());
$this->assertIdentical($elements[1]->getAttribute('href'), Url::fromRoute('search.view_dummy_search_type')->toString());
$this->assertIdentical($elements[2]->getAttribute('href'), Url::fromRoute('search.view_user_search')->toString());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.