class (none) \ PHPUnit_Extensions_GroupTestSuite

All implemented interfaces:
Countable, PHPUnit_Framework_Test, PHPUnit_Framework_SelfDescribing, IteratorAggregate

We have a TestSuite object A. In TestSuite object A we have Tests tagged with @group. We want a TestSuite object B that contains TestSuite objects C, D, ... for the Tests tagged with @group C, @group D, ... Running the Tests from TestSuite object B results in Tests tagged with both

$suite = new PHPUnit_Extensions_GroupTestSuite($A, array('C', 'D'));


Method Summary

Name Description
__construct(PHPUnit_Framework_TestSuite $suite, array $groups)Constructs a new TestSuite:

Inherited Method Summary

Name Description
addTest(PHPUnit_Framework_Test $test, $groups = array())Adds a test to the suite. (from PHPUnit_Framework_TestSuite)
addTestFile($filename)Wraps both addTest() and addTestSuite as well as the separate import statements for the user's convenience. (from PHPUnit_Framework_TestSuite)
addTestFiles($filenames)Wrapper for addTestFile() that adds multiple test files. (from PHPUnit_Framework_TestSuite)
addTestMethod(ReflectionClass $class, ReflectionMethod $method) (from PHPUnit_Framework_TestSuite)
addTestSuite($testClass)Adds the tests from the given class to the suite. (from PHPUnit_Framework_TestSuite)
count($preferCache = false)Counts the number of test cases that will be run by this test. (from PHPUnit_Framework_TestSuite)
createResult()Creates a default TestResult object. (from PHPUnit_Framework_TestSuite)
createTest(ReflectionClass $theClass, $name) (from PHPUnit_Framework_TestSuite)
getGroupDetails() (from PHPUnit_Framework_TestSuite)
getGroups()Returns the test groups of the suite. (from PHPUnit_Framework_TestSuite)
getIterator()Returns an iterator for this test suite. (from PHPUnit_Framework_TestSuite)
getName()Returns the name of the suite. (from PHPUnit_Framework_TestSuite)
incompleteTest($class, $methodName, $message) (from PHPUnit_Framework_TestSuite)
injectFilter(PHPUnit_Runner_Filter_Factory $filter) (from PHPUnit_Framework_TestSuite)
isTestMethod(ReflectionMethod $method) (from PHPUnit_Framework_TestSuite)
markTestSuiteSkipped($message = "")Mark the test suite as skipped. (from PHPUnit_Framework_TestSuite)
run(PHPUnit_Framework_TestResult $result = null)Runs the tests and collects their result in a TestResult. (from PHPUnit_Framework_TestSuite)
runTest(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result)Runs a test. (from PHPUnit_Framework_TestSuite)
setBackupGlobals($backupGlobals) (from PHPUnit_Framework_TestSuite)
setBackupStaticAttributes($backupStaticAttributes) (from PHPUnit_Framework_TestSuite)
setDisallowChangesToGlobalState($disallowChangesToGlobalState) (from PHPUnit_Framework_TestSuite)
setGroupDetails(array $groups)Set tests groups of the test case (from PHPUnit_Framework_TestSuite)
setName($name)Sets the name of the suite. (from PHPUnit_Framework_TestSuite)
setRunTestInSeparateProcess($runTestInSeparateProcess) (from PHPUnit_Framework_TestSuite)
setTests(array $tests)Set tests of the test suite (from PHPUnit_Framework_TestSuite)
setUp()Template Method that is called before the tests of this test suite are run. (from PHPUnit_Framework_TestSuite)
skipTest($class, $methodName, $message) (from PHPUnit_Framework_TestSuite)
tearDown()Template Method that is called after the tests of this test suite have finished running. (from PHPUnit_Framework_TestSuite)
testAt($index)Returns the test at the given index. (from PHPUnit_Framework_TestSuite)
tests()Returns the tests as an enumeration. (from PHPUnit_Framework_TestSuite)
toString()Returns a string representation of the test suite. (from PHPUnit_Framework_TestSuite)
warning($message) (from PHPUnit_Framework_TestSuite)

public function __construct(PHPUnit_Framework_TestSuite $suite, array $groups)

Constructs a new TestSuite: (from __construct)

- 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:
mixed - $theClass
string - $name
Throws:
PHPUnit_Framework_Exception