PHPUnit2_Framework_TestSuite
A PHPUnit2_Framework_TestSuite
is a composite of PHPUnit2_ Framework_Tests
. At its simplest, it contains a group of test cases, all of which are run when the suite is run. Since it is a composite, however, a suite can contain suites that can contain suites and so on, making it easy to combine tests from various sources and run them together.
PHPUnit2_Framework_TestSuite
contains protocols to create named or unnamed instances, as well as the PHPUnit2_ Framework_Test
protocols, run(PHPUnit2_Framework_TestResult $result
) and countTestCases( )
. Table 11 shows the instance creation protocol for PHPUnit2_Framework_TestSuite
.
Table 11. Creating named or unnamed instances
Method |
Description |
---|---|
__ |
Returns an empty test suite. |
__ |
Returns a test suite containing an instance of the class named |
__ |
Returns a test suite named |
__ |
Returns a test suite containing an instance of the class represented by |
__ |
Returns a test suite named |
Get PHPUnit Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.