function SearchbyPageAttachCCK2Test::testSearchAttach in Search by Page 6
Tests that attachments are searched.
Overrides SearchByPageAttachCCKTest::testSearchAttach
File
- tests/
search_by_page.test, line 2572 - Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com
Class
- SearchbyPageAttachCCK2Test
- Functionality test 2 for Search by Page Attachments with CCK module.
Code
function testSearchAttach() {
$this
->drupalLogin($this->superuser);
$search_path = $this->envinfo2['page_path'];
// Search for the word 'flowers'
$this
->drupalPost($search_path, array(
'keys' => 'flowers',
), t('Search pages'));
// Should find both listed and non-listed attachments on the first node
$this
->assertText('flowers', "Flowers appears in search results for flowers");
$this
->assertText('daisy', "First attachment was found");
$this
->assertText('snapdragon', "Second attachment was found");
$this
->assertNoText('dahlia', "Third attachment was not found");
}