TestSuite
class TestSuite implements IteratorAggregate, Reorderable, Test (View source)
| internal | This class is not covered by the backward compatibility promise for PHPUnit |
Methods
Adds the tests from the given class to the suite.
Wraps both addTest() and addTestSuite
as well as the separate import statements for the user's convenience.
Wrapper for addTestFile() that adds multiple test files.
Counts the number of test cases that will be run by this test.
No description
No description
No description
No description
No description
Returns the tests as an enumeration.
Set tests of the test suite.
Mark the test suite as skipped.
Returns an iterator for this test suite.
No description
No description
No description
No description
Details
static TestSuite
empty(string $name)
No description
static TestSuite
fromClassReflector(ReflectionClass $class, array $groups = [])
No description
void
addTest(Test $test, array $groups = [])
Adds a test to the suite.
void
addTestSuite(ReflectionClass $testClass, array $groups = [])
Adds the tests from the given class to the suite.
void
addTestFile(string $filename, array $groups = [])
Wraps both addTest() and addTestSuite
as well as the separate import statements for the user's convenience.
If the named file cannot be read or there are no new tests that can be
added, a PHPUnit\Framework\WarningTestCase will be created instead,
leaving the current test run untouched.
void
addTestFiles(iterable $fileNames)
Wrapper for addTestFile() that adds multiple test files.
int
count()
Counts the number of test cases that will be run by this test.
bool
isEmpty()
No description
string
name()
No description
array
groups()
No description
array
collect()
No description
void
run()
No description
array
tests()
Returns the tests as an enumeration.
void
setTests(array $tests)
Set tests of the test suite.
never
markTestSuiteSkipped(string $message = '')
Mark the test suite as skipped.
Iterator
getIterator()
Returns an iterator for this test suite.
void
injectFilter(Factory $filter)
No description
array
provides()
No description
array
requires()
No description
string
sortId()
No description
bool
isForTestClass()
No description
protected void
addTestMethod(ReflectionClass $class, ReflectionMethod $method, array $groups)
No description