function SearchByPagePathsTest::testSearchExclusions in Search by Page 6
Same name and namespace in other branches
- 7 tests/search_by_page.test \SearchByPagePathsTest::testSearchExclusions()
Tests that the text in the excluded tag is actually excluded.
File
- tests/
search_by_page.test, line 1338 - Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com
Class
- SearchByPagePathsTest
- Functionality tests for Search by Page Paths.
Code
function testSearchExclusions() {
$search_path = $this->envinfo1['page_path'];
$this
->drupalLogin($this->noprivuser);
$this
->drupalPost($search_path, array(
'keys' => 'Trees',
), t('Search pages'));
$this
->assertNoText('Poplar', "Excluded text is not shown in search for Trees");
$this
->assertText('Cottonwood', "Non-excluded text is shown in search for Trees");
$this
->drupalPost($search_path, array(
'keys' => 'Poplar',
), t('Search pages'));
$this
->assertNoText('Poplar', "Excluded text is not shown in search for excluded text");
$this
->assertNoText('Trees', "Trees is not shown in search for excluded text");
$this
->assertNoText('Cottonwood', "Non-excluded text is not shown in search for excluded text");
}