Index: modules/help/help.test =================================================================== RCS file: /cvs/drupal/drupal/modules/help/help.test,v retrieving revision 1.3 diff -u -p -r1.3 help.test --- modules/help/help.test 25 Nov 2008 13:14:27 -0000 1.3 +++ modules/help/help.test 25 Nov 2008 22:44:31 -0000 @@ -17,11 +17,9 @@ class HelpTestCase extends DrupalWebTest * Enable modules and create users with specific permissions. */ function setUp() { - parent::setUp(); + parent::setUp('blog', 'poll', 'help_test'); // Loading these (and other?) modules will result in failures? -// $this->drupalModuleEnable('blog'); -// $this->drupalModuleEnable('poll'); $this->getModuleList(); // Create users. @@ -40,6 +38,25 @@ class HelpTestCase extends DrupalWebTest // Login the regular user. $user = $this->drupalLogin($this->any_user); $this->verifyHelp(403); + + // Check for css on admin/help. + $this->drupalLogin($this->big_user); + $this->drupalGet('admin/help'); + $this->assertRaw(drupal_get_path('module', 'help') . '/help.css', t('CSS correctly added to admin/help')); + + // Verify that introductory help text exists, goes for 100% module coverage + $this->assertRaw('
' . t('This guide provides context sensitive help on the use and configuration of Drupal and its modules, '. + 'and is a supplement to the more extensive online Drupal handbook. The online handbook may contain more up-to-date '. + 'information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', + array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) . '
', t('Help intro text correctly appears.')); + + // Verify that help topics text appears. + $this->assertRaw('' . t('Help is available on the following items:') . '
', t('Help topics text correctly appears.')); + + // Make sure links are properly added for modules implementing hook_help(). + foreach ($this->modules as $module => $name) { + $this->assertLink($name, 0, t('Link properly added to @name (admin/help/@module)', array('@module' => $module, '@name' => $name))); + } } /** @@ -55,10 +72,6 @@ class HelpTestCase extends DrupalWebTest $this->drupalGet('admin/help/' . $module); $this->assertResponse($response); if ($response == 200) { - // NOTE: The asserts fail on blog and poll because the get returns the 'admin/help' node instead of the indicated node??? -// if ($module == 'blog' || $module == 'poll') { -// continue; -// } $this->assertTitle($name . ' | Drupal', t('[' . $module . '] Title was displayed')); $this->assertRaw(''. t('Dummy module implementing hook help to test help text availablity.') .'
'; + } +}