class MyTest extends PHPUnit_Framework_TestCase { public function testOne() { // Test code goes here } } $suite = new PHPUnit_Framework_TestSuite("MyTest"); $suite->addTestSuite("MyTest"); PHPUnit_TextUI_TestRunner::run($suite);
class MyTestSuite extends PHPUnit_Framework_TestSuite { public static function suite() { $suite = new self(); $suite->addTestSuite("MyTest"); $suite->addTestSuite("AnotherTest"); return $suite; } } // To run tests PHPUnit_TextUI_TestRunner::run(MyTestSuite::suite());This example creates a new TestSuite class that extends the PHPUnit_Framework_TestSuite class. It defines a suite function that adds two test classes (MyTest and AnotherTest) to the suite and returns the suite object. It then runs the suite using the TextUI runner. Overall, the PHPUnit_Framework_TestSuite class is a useful tool for grouping and running multiple tests in PHP. It is a part of the PHPUnit package library.