"Call to undefined method BadGroupTest::getTestInstances()" when no tests are found
MadHarold - December 11, 2007 - 14:16
| Project: | SimpleTest |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Description
The 'BadGroupTest' class isn't loaded there, so Drupal dies with the following message:
"Fatal error: Call to undefined method BadGroupTest::getTestInstances() in /var/www/drupal/sites/all/modules/simpletest/simpletest.module on line 177"
In 'drupal_unit_tests.php' line 50 there seems to be some 'old' code (or copied from simpletest itself?) to display a message when no tests are defined.
<?php
$this->addTestCase(new BadGroupTest($test_file, 'No new test cases'));
?>I'd reckon that this should be changed to a 'drupal_set_message()' or something...
-H-

#1
Here is a patch that uses
drupal_set_messageinstead.Rok Žlender would know if there are other reasons for keeping it the way it is. If so it still needs to be fixed.
#2
Patch looks good.
#3
Got the "ok" from Zlender.
Committed.
#4
Automatically closed -- issue fixed for two weeks with no activity.