protected function PanelsEverywhereTestHelper::checkSearch in Panels Everywhere 7
Abstracted test to ensure that core's search functionality works.
Parameters
string $path: The path to load to start the search from.
7 calls to PanelsEverywhereTestHelper::checkSearch()
- PanelsEverywhereBasicsTestCase::testSearch in tests/
PanelsEverywhereBasicsTestCase.test - Ensure the search form loads correctly when PE is enabled for a theme.
- PanelsEverywhereNodeEditTestCase::testSearchWithoutPanels in tests/
PanelsEverywhereNodeEditTestCase.test - Confirm that the search form works from a node-add page.
- PanelsEverywhereNodeEditTestCase::testSearchWithPanels in tests/
PanelsEverywhereNodeEditTestCase.test - Confirm that the search form works from a Panels node-add page.
- PanelsEverywhereTermEditTestCase::testSearchWithoutPanels in tests/
PanelsEverywhereTermEditTestCase.test - Confirm that the search form works from a term-add page without Panels.
- PanelsEverywhereTermEditTestCase::testSearchWithPanels in tests/
PanelsEverywhereTermEditTestCase.test - Confirm that the search form works from a Panels term-add page.
File
- tests/
PanelsEverywhereTestHelper.test, line 78 - Some helper functions for the other tests.
Class
- PanelsEverywhereTestHelper
- @file Some helper functions for the other tests.
Code
protected function checkSearch($path = '<front>') {
$keyword = 'Test';
// Create some sample content.
// $this->createSampleNodes('Test');
// Load a node-add page.
$this
->drupalGet($path);
$this
->assertResponse(200);
// Look for the search box.
$this
->assertFieldByName('search_block_form');
// Submit the search box.
$edit = array(
'search_block_form' => $keyword,
);
$this
->drupalPost(NULL, $edit, t('Search'));
$this
->assertResponse(200);
// Confirm that the page was loaded.
$this
->assertText(t('Your search yielded no results'));
$this
->assertURL('search/node/' . $keyword);
}