Updating 6.x-1.x style tests to 6.x-2.x and/or 7.x

Events happening in the community are now at Drupal community events on www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

In porting the Pathauto tests from the Simpletest 6.x-1.x to 6.x-2.x style I found a few things I thought I would document here in the hopes that they benefit others:

  1. Put the .test file into the root directory of your module. If you had it in modules/tests/module.test it now belongs in modules/module.test
  2. DrupalTestCase is now DrupalWebTestCase
  3. get_info() is now getInfo()
  4. in getInfo, desc is now description
  5. $this->drupalCreateUserRolePerm is now $this->drupalCreateUser(
  6. drupalLoginUser is now drupalLogin
  7. assertWantedRaw is now assertRaw and >assertWantedPattern is now assertPattern(
  8. $this->drupalVariableSet is now just a standard variable_set
  9. $this->drupalModuleEnable is deprecated in favor of parent::setUp('modulename', 'secondmodulename') in your setUp() override.

I was unable to determine how to get the report of "58 passes, 0 fails, 0 exceptions". Any help on that?

Testing and Quality Assurance

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: