/[drupal]/contributions/modules/help_soc/help/help.test
ViewVC logotype

Diff of /contributions/modules/help_soc/help/help.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3, Sun Jun 15 00:46:37 2008 UTC revision 1.4, Sun Aug 17 21:01:56 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: help.test,v 1.2 2008/06/14 21:49:10 Gurpartap Exp $  // $Id: $
3    
4  class HelpTestCase extends DrupalWebTestCase {  class HelpTestCase extends DrupalWebTestCase {
5    protected $big_user;    protected $big_user;
# Line 22  class HelpTestCase extends DrupalWebTest Line 22  class HelpTestCase extends DrupalWebTest
22    function setUp() {    function setUp() {
23      parent::setUp();      parent::setUp();
24    
     // Loading these (and other?) modules will result in failures?  
 //    $this->drupalModuleEnable('blog');  
 //    $this->drupalModuleEnable('poll');  
25      $this->getModuleList();      $this->getModuleList();
26    
27      // Create users.      // Create users.
28      $this->big_user = $this->drupalCreateUser(array('access administration pages')); // 'administer blocks', 'administer site configuration',      $this->big_user = $this->drupalCreateUser(array('access administration pages', 'access help', 'search help')); // 'administer blocks', 'administer site configuration',
29      $this->any_user = $this->drupalCreateUser(array());      $this->any_user = $this->drupalCreateUser(array());
30    }    }
31    
# Line 58  class HelpTestCase extends DrupalWebTest Line 55  class HelpTestCase extends DrupalWebTest
55        $this->drupalGet('admin/help/' . $module);        $this->drupalGet('admin/help/' . $module);
56        $this->assertResponse($response);        $this->assertResponse($response);
57        if ($response == 200) {        if ($response == 200) {
58          // NOTE: The asserts fail on blog and poll because the get returns the 'admin/help' node instead of the indicated node???          $this->assertTitle('About ' . $name . ' | Drupal', t('[' . $module . '] Title was displayed'));
59  //        if ($module == 'blog' || $module == 'poll') {          $this->assertRaw('<h2>About ' . t($name) . '</h2>', t('[' . $module . '] Heading was displayed'));
 //          continue;  
 //        }  
         $this->assertTitle($name . ' | Drupal', t('[' . $module . '] Title was displayed'));  
         $this->assertRaw('<h2>' . t($name) . '</h2>', t('[' . $module . '] Heading was displayed'));  
60          $this->assertText(t('Home ' . $crumb . ' Administer ' . $crumb . ' Help'), t('[' . $module . '] Breadcrumbs were displayed'));          $this->assertText(t('Home ' . $crumb . ' Administer ' . $crumb . ' Help'), t('[' . $module . '] Breadcrumbs were displayed'));
61        }        }
62      }      }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2