diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-05-26 17:22:59 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-05-26 17:22:59 +0000 |
commit | 7804e634d610b03dc5d318143c5bdcfe1b118bf0 (patch) | |
tree | 14688e1ffcf5528d27aa6d24bfcf7be2fa12cf3f | |
parent | c529e4afbece1355bee882500faf2fd0c059048a (diff) | |
download | brdo-7804e634d610b03dc5d318143c5bdcfe1b118bf0.tar.gz brdo-7804e634d610b03dc5d318143c5bdcfe1b118bf0.tar.bz2 |
- Patch #242048 by macgirvin, Freso, Senpai, flobruit, catch, robertDouglass, Garrett Albright, et al: change 'blue smurf' to 'bike shed' ;-)
-rw-r--r-- | modules/search/search.module | 4 | ||||
-rw-r--r-- | modules/search/search.test | 35 |
2 files changed, 37 insertions, 2 deletions
diff --git a/modules/search/search.module b/modules/search/search.module index 484bfadb9..b03003b0c 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -105,8 +105,8 @@ function search_help($path, $arg) { case 'search#noresults': return t('<ul> <li>Check if your spelling is correct.</li> -<li>Remove quotes around phrases to match each word individually: <em>"blue smurf"</em> will match less than <em>blue smurf</em>.</li> -<li>Consider loosening your query with <em>OR</em>: <em>blue smurf</em> will match less than <em>blue OR smurf</em>.</li> +<li>Remove quotes around phrases to search for each word individually. <em>bike shed</em> will often show more results than <em>"bike shed"</em>.</li> +<li>Consider loosening your query with <em>OR</em>. <em>bike OR shed</em> will often show more results than <em>bike shed</em>.</li> </ul>'); } } diff --git a/modules/search/search.test b/modules/search/search.test index 92d09c1f8..dcaef0a12 100644 --- a/modules/search/search.test +++ b/modules/search/search.test @@ -161,6 +161,41 @@ class SearchMatchTestCase extends DrupalWebTestCase { } } +class SearchBikeShed extends DrupalWebTestCase { + protected $searching_user; + /** + * Implementation of getInfo(). + */ + function getInfo() { + return array( + 'name' => t('Bike shed'), + 'description' => t('Tests the bike shed text on the no results page.'), + 'group' => t('Search') + ); + } + + /** + * Implementation of setUp(). + */ + function setUp() { + parent::setUp('search'); + + // Create user. + $this->searching_user = $this->drupalCreateUser(array('search content')); + } + + function testFailedSearch() { + $this->drupalLogin($this->searching_user); + $this->drupalGet('search/node'); + $this->assertText(t('Enter your keywords')); + + $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.')); + } +} + class SearchRankingTestCase extends DrupalWebTestCase { /** * Implementation of getInfo(). |