diff --git a/modules/search/search.test b/modules/search/search.test index 4d37133..92f7c6b 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -241,15 +241,15 @@ class SearchMatchTestCase extends DrupalWebTestCase { } /** - * Tests the bike shed text on no results page, and text on the search page. + * Tests the search and search results pages. */ -class SearchPageText extends DrupalWebTestCase { +class SearchPage extends DrupalWebTestCase { protected $searching_user; public static function getInfo() { return array( - 'name' => 'Search page text', - 'description' => 'Tests the bike shed text on the no results page, and various other text on search pages.', + 'name' => 'Search page', + 'description' => 'Tests the search and search results pages.', 'group' => 'Search' ); } @@ -264,7 +264,7 @@ class SearchPageText extends DrupalWebTestCase { /** * Tests the failed search text, and various other text on the search page. */ - function testSearchText() { + function testSearchPage() { $this->drupalLogin($this->searching_user); $this->drupalGet('search/node'); $this->assertText(t('Enter your keywords')); @@ -290,6 +290,10 @@ class SearchPageText extends DrupalWebTestCase { $this->drupalGet('search/node/' . $arg); $input = $this->xpath("//input[@id='edit-keys' and @value='{$arg}']"); $this->assertFalse(empty($input), 'Search keys with a / are correctly set as the default value in the search box.'); + + // Test requesting the search page with an invalid query string. + $this->drupalGet('/search/node', array('query' => array('keys' => array(NULL)))); + $this->assertResponse(200); } }