You are here

function SearchByPagePathsAliasTest::testSearchPage in Search by Page 8

Tests that aliased page can be searched.

File

tests/src/Functional/search_by_page.test, line 1605
Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com

Class

SearchByPagePathsAliasTest
Tests for Search by Page Paths - searching nodes with aliases.

Namespace

Drupal\Tests\search_by_page\Functional

Code

function testSearchPage() {

  // Search for 'walk' - should find the page
  $search_path = $this->envinfo1['page_path'];
  $this
    ->drupalLogin($this->superuser);
  $this
    ->drupalPostForm($search_path, array(
    'keys' => 'walk',
  ), t('Search pages'));
  $this
    ->assertText('walk', "Walk appears in search results for walk");
  $this
    ->assertText('streets', "Aliased page was found");
}