? bikeshedtest.patch ? uncoloured_bike_shed.d7.patch Index: modules/search/search.module =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.module,v retrieving revision 1.256 diff -u -p -r1.256 search.module --- modules/search/search.module 6 May 2008 12:18:50 -0000 1.256 +++ modules/search/search.module 9 May 2008 10:11:20 -0000 @@ -105,8 +105,8 @@ function search_help($path, $arg) { case 'search#noresults': return t(''); } } Index: modules/search/search.test =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.test,v retrieving revision 1.1 diff -u -p -r1.1 search.test --- modules/search/search.test 20 Apr 2008 18:23:29 -0000 1.1 +++ modules/search/search.test 9 May 2008 10:11:21 -0000 @@ -160,3 +160,37 @@ class SearchMatchTestCase extends Drupal $this->assertEqual(!count($scores) || (min($scores) > 0.0 && max($scores) <= 1.0001), TRUE, "Query scoring '$query'"); } } + +class SearchBikeShed extends DrupalWebTestCase { + /** + * 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->drupalPost('search/node', $edit, t('Search')); + $this->assertText(t('Consider loosening your query with OR: bike shed will match less than bike OR shed.')); + } +} \ No newline at end of file