You are here

function SearchByPagePathsRemoveTest::testSearchPages in Search by Page 7

Same name and namespace in other branches
  1. 6 tests/search_by_page.test \SearchByPagePathsRemoveTest::testSearchPages()

Tests that pages can be searched.

File

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

Class

SearchByPagePathsRemoveTest
Functionality test for removing paths from Search by Page Paths.

Code

function testSearchPages() {

  // Privileged user - should see the one remaining page.
  $search_path = $this->envinfo1['page_path'];
  $this
    ->drupalLogin($this->privuser);
  $this
    ->drupalPost($search_path, array(
    'keys' => 'Trees',
  ), t('Search pages'));
  $this
    ->assertText('Trees', "Found Trees on the search results page");
  $this
    ->assertNoText('Pine', "Cannot see first deleted page in search results");
  $this
    ->assertNoText('Oak', "Cannot see second deleted page in search results");
  $this
    ->assertText('Orange', "Can see third page in search results");
}