Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 3.4.4
-
Fix Version/s: 4.1.0
-
Component/s: Test suite
-
Labels:None
Description
Any Simpletest test case depending on civicrm will crash during setUp() on the second test, with an error like,
> "Could not find access_callback in path tree, Could not find access_arguments in path tree, Could not find page_callback in path tree, Could not find page_arguments in path tree, Could not find is_ssl in path tree"
Try extending this wrapper class when writing Simpletest cases:
<pre>
class civicrm_simpletest_case extends DrupalWebTestCase
{
function setUp(/* requires */)
{
$requires = func_get_args();
$requires = array_merge(array('civicrm'), $requires);
parent::setUp();
foreach ($requires as $module)
$this->assertTrue(civicrm_initialize(), "Civicrm couldn't be initialized");
}
function tearDown()
}
</pre>