- \PHPUnit_Framework_TestSuite
- \PHPUnit_Extensions_PhptTestSuite
class (none) \ PHPUnit_Extensions_PhptTestSuite
- All implemented interfaces:
- Countable, PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing, IteratorAggregate
Suite for .phpt test cases.
Here is an example using the dynamic test definition.
addTest(new MathTest('testPass')); ?>
Alternatively, a TestSuite can extract the tests to be run automatically. To do so you pass a ReflectionClass instance for your PHPUnit_Framework_TestCase class to the PHPUnit_Framework_TestSuite constructor.
This constructor creates a suite with all the methods starting with "test" that take no arguments. (from PHPUnit_Framework_TestSuite)
Method Summary
Name | Description |
---|---|
__construct($directory) | Constructs a new TestSuite for .phpt test cases. |
Inherited Method Summary
public function __construct($directory)
Constructs a new TestSuite for .phpt test cases.
- PHPUnit_Framework_TestSuite() constructs an empty TestSuite.
- PHPUnit_Framework_TestSuite(ReflectionClass) constructs a TestSuite from the given class.
- PHPUnit_Framework_TestSuite(ReflectionClass, String) constructs a TestSuite from the given class with the given name.
- PHPUnit_Framework_TestSuite(String) either constructs a TestSuite from the given class (if the passed string is the name of an existing class) or constructs an empty TestSuite with the given name. (from __construct)
- Overrides:
- __construct($theClass = "", $name = "")
- Parameters:
string
- $directory- Throws:
- PHPUnit_Framework_Exception