diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-09-24 00:37:45 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-09-24 00:37:45 +0000 |
commit | c9de4646c570a45de03d6e7ec470daf01a8d2cab (patch) | |
tree | 5d8781ec52d1cf25c5ca1a842d2a7a65bf0f7e95 /modules/search | |
parent | 4bd74a00668557ce827e4c51d7c278548518aaf8 (diff) | |
download | brdo-c9de4646c570a45de03d6e7ec470daf01a8d2cab.tar.gz brdo-c9de4646c570a45de03d6e7ec470daf01a8d2cab.tar.bz2 |
- Patch #907690 by sun, pwolanin: breadcrumbs don't work for dynamic paths and local tasks #2.
Diffstat (limited to 'modules/search')
-rw-r--r-- | modules/search/search.module | 1 | ||||
-rw-r--r-- | modules/search/search.test | 26 |
2 files changed, 21 insertions, 6 deletions
diff --git a/modules/search/search.module b/modules/search/search.module index a66f1b96a..e4f4130ba 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -182,7 +182,6 @@ function search_menu() { 'page callback' => 'drupal_get_form', 'page arguments' => array('search_reindex_confirm'), 'access arguments' => array('administer search'), - 'type' => MENU_CALLBACK, 'file' => 'search.admin.inc', ); diff --git a/modules/search/search.test b/modules/search/search.test index 7e97640c3..29fa9ef3f 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -236,13 +236,16 @@ class SearchMatchTestCase extends DrupalWebTestCase { } } -class SearchBikeShed extends DrupalWebTestCase { +/** + * Tests the bike shed text on no results page, and text on the search page. + */ +class SearchPageText extends DrupalWebTestCase { protected $searching_user; public static function getInfo() { return array( - 'name' => 'Bike shed', - 'description' => 'Tests the bike shed text on the no results page.', + 'name' => 'Search page text', + 'description' => 'Tests the bike shed text on the no results page, and various other text on search pages.', 'group' => 'Search' ); } @@ -251,18 +254,31 @@ class SearchBikeShed extends DrupalWebTestCase { parent::setUp('search'); // Create user. - $this->searching_user = $this->drupalCreateUser(array('search content')); + $this->searching_user = $this->drupalCreateUser(array('search content', 'access user profiles')); } - function testFailedSearch() { + /** + * Tests the failed search text, and various other text on the search page. + */ + function testSearchText() { $this->drupalLogin($this->searching_user); $this->drupalGet('search/node'); $this->assertText(t('Enter your keywords')); + $this->assertText(t('Search')); + $title = t('Search') . ' | Drupal'; + $this->assertTitle($title, 'Search page title is correct'); $edit = array(); $edit['keys'] = 'bike shed ' . $this->randomName(); $this->drupalPost('search/node', $edit, t('Search')); $this->assertText(t('Consider loosening your query with OR. bike OR shed will often show more results than bike shed.'), t('Help text is displayed when search returns no results.')); + $this->assertText(t('Search')); + $this->assertTitle($title, 'Search page title is correct'); + + $edit['keys'] = $this->searching_user->name; + $this->drupalPost('search/user', $edit, t('Search')); + $this->assertText(t('Search')); + $this->assertTitle($title, 'Search page title is correct'); } } |