function SearchbyPageAttach2Test::testSearchAttach in Search by Page 8
Tests that attachments are searched, and permissions.
Overrides SearchByPageAttachTest::testSearchAttach
File
- tests/
src/ Functional/ search_by_page.test, line 2171 - Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com
Class
- SearchbyPageAttach2Test
- Functionality test 2 for Search by Page Attachments.
Namespace
Drupal\Tests\search_by_page\FunctionalCode
function testSearchAttach() {
$this
->drupalLogin($this->superuser);
$search_path = $this->envinfo1['page_path'];
// Search for the word 'flowers'
$this
->drupalPostForm($search_path, array(
'keys' => 'flowers',
), t('Search pages'));
// Should find both 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");
}