function SearchByPageThemeTest::testTheme in Search by Page 7
Tests that the right theme was used to index the page.
File
- tests/
search_by_page.test, line 3197 - Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com
Class
- SearchByPageThemeTest
- Tests that the right theme is used for indexing.
Code
function testTheme() {
$search_path = $this->envinfo1['page_path'];
// Search for Cat (block in the right theme) should be successful.
$this
->drupalPost($search_path, array(
'keys' => 'cat',
), t('Search pages'));
$this
->assertText('Trees', "Found Trees on the search results page");
$this
->assertText('cat', "Found cat block on the search results page");
$this
->assertNoText('dog', "Did not find dog block on the search results page");
// Search for Dog (block in the wrong theme) should not be successful.
$this
->drupalPost($search_path, array(
'keys' => 'dog',
), t('Search pages'));
$this
->assertText('Your search yielded no results', 'Search for dog was unsuccessful');
}