Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.257
diff -u -p -r1.257 search.module
--- modules/search/search.module 14 May 2008 15:07:25 -0000 1.257
+++ modules/search/search.module 20 May 2008 20:32:12 -0000
@@ -105,8 +105,8 @@ function search_help($path, $arg) {
case 'search#noresults':
return t('
- Check if your spelling is correct.
-- Remove quotes around phrases to match each word individually: "blue smurf" will match less than blue smurf.
-- Consider loosening your query with OR: blue smurf will match less than blue OR smurf.
+- Remove quotes around phrases to match each word individually: "blue water" will match less than blue water.
+- Consider loosening your query with OR: blue water will match less than blue OR water.
');
}
}
Index: modules/search/search.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.test,v
retrieving revision 1.2
diff -u -p -r1.2 search.test
--- modules/search/search.test 14 May 2008 11:10:52 -0000 1.2
+++ modules/search/search.test 20 May 2008 20:32:12 -0000
@@ -248,3 +248,38 @@ class SearchRankingTestCase extends Drup
}
}
}
+
+class SearchBlueWater extends DrupalWebTestCase {
+ protected $searching_user;
+ /**
+ * Implementation of getInfo().
+ */
+ function getInfo() {
+ return array(
+ 'name' => t('Blue water'),
+ 'description' => t('Tests the blue water 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'] = 'blue water ' . $this->randomName();
+ $this->drupalPost('search/node', $edit, t('Search'));
+ $this->assertText(t('Consider loosening your query with OR: blue water will match less than blue OR water.'), t('Help text is displayed when search returns no results.'));
+ }
+}