You are here

public function SearchConfigSettingsFormTest::testDefaultSearchPageOrdering 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::testDefaultSearchPageOrdering()

Tests the ordering of search pages on a clean install.

File

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

Class

SearchConfigSettingsFormTest
Verify the search config settings form.

Namespace

Drupal\search\Tests

Code

public function testDefaultSearchPageOrdering() {
  $this
    ->drupalGet('search');
  $elements = $this
    ->xpath('//*[contains(@class, :class)]//a', array(
    ':class' => 'tabs primary',
  ));
  $this
    ->assertIdentical((string) $elements[0]['href'], \Drupal::url('search.view_node_search'));
  $this
    ->assertIdentical((string) $elements[1]['href'], \Drupal::url('search.view_dummy_search_type'));
  $this
    ->assertIdentical((string) $elements[2]['href'], \Drupal::url('search.view_user_search'));
}