I've just fixed the simpletests of rules to work with (a recent) 6.x-2.x and had some troubles. See #377868: Rules.test tearDown() method uses incorrect order.

It looks like the module wasn't installed correctly, so the rules cache table was missing. I was able to fix it by adding

drupal_install_modules(array('rules','rules_test'));

to the setUp() method. Perhaps the problem is that the module providing the test is 'rules_test', which depends on rules?

Comments

boombatower’s picture

Status: Active » Postponed (maintainer needs more info)

So you did

parrent::setUp('module1', 'module2');
boombatower’s picture

ping

Freso’s picture

Title: modules aren't installed correctly? » Modules are not installed correctly
Status: Postponed (maintainer needs more info) » Active

I can replicate this:

  function setUp() {
    parent::setUp('pathauto');
    $this->assertTrue(module_exists('pathauto'), t('Pathauto module is loaded.'));
    $this->assertTrue(module_exists('path'), t('Path module is loaded.'));
    $this->assertTrue(module_exists('token'), t('Token module is loaded.'));
  }

Pathauto module is loaded, but Path and Token are not. Both modules are in pathauto.info's dependencies[].

boombatower’s picture

Status: Active » Closed (duplicate)

Then you are referring to dependency checking which is an entirely different matter.

Please see: #399642: Replace drupal_install_modules() with an improved module_enable().