I tried following the PHPUnit tutorial on how to configure testuite with a custom test execution order. Now I realized that I only need these lines, and some of them are for the package to work:
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite('Package');
return $suite;
}
But when I use the lines above, the order in which the test runs is determined by the sort order of my inclusions. And when I try to change it through suite (), as follows, the tests are executed twice, first in the sort order, as defined in the package (), and then in the sort order includes:
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite('Package');
$suite->addTestSuite('Package_Class1Test');
$suite->addTestSuite('Package_Class2Test');
$suite->addTestSuite('Package_Class3Test');
return $suite;
}
Includes:
require_once 'Package/Class3Test.php';
require_once 'Package/Class2Test.php';
require_once 'Package/Class1Test.php';
Result (test execution order):
1) Class1Test
2) Class2Test
3) Class3Test
4) Class3Test
5) Class2Test
6) Class1Test
Netbeans 7.0beta PHP 5.3.5/PHPUnit 3.5.11 Windows 7.
phpunit (http://www.phpunit.de/manual/3.5/en/organizing-tests.html), , ...
, .
PS: .