in the tutorial page here: http://www.simpletest.org/en/gain_control_tutorial.html
it says the pitfalls of using TestSuite::addFile()
----
The pitfalls of this are...
1. If the test file has already been included, no new classes will be added to this group
2. If the test file has other classes that are related to SimpleTestCase then these will be added to the group test as well.
----
With regards to the first pitfall, i am confused what that exactly means.
so i tried an experiment.
I included a test file in my all_tests.php script.
Then I made a call within the ''AllTests extends TestSuite '' constructor that tries to include it again.
It seemed to work ok. new classes _were_ added to the group after a file had 'already been inlcuded'. see code:
----
require_once(dirname(__FILE__) . '/simpletest/autorun.php');
include(dirname(__FILE__) . '/log_test.php');
//require_once(dirname(__FILE__) . '/log_test.php'); //also works if uncommented
class AllTests extends TestSuite
{
function __construct()
{
parent::__construct();
$this->addFile(dirname(__FILE__) . '/log_test.php'); //attempting to include the file a second time
$this->addFile(dirname(__FILE__) . '/clock_test.php');
}
}
----
The above code seems to work, despite the pitfall that says:
''If the test file has already been included, no new classes will be added to this group''