◆ __construct()
PHPUnit\Framework\TestSuite::__construct |
( |
|
$theClass = '' , |
|
|
string |
$name = '' |
|
) |
| |
Constructs a new TestSuite:
- 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.
- Parameters
-
\ReflectionClass | string | $theClass | |
- Exceptions
-
◆ addTest()
PHPUnit\Framework\TestSuite::addTest |
( |
Test |
$test, |
|
|
|
$groups = [] |
|
) |
| |
Adds a test to the suite.
- Parameters
-
◆ addTestFile()
PHPUnit\Framework\TestSuite::addTestFile |
( |
string |
$filename | ) |
|
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.
- Exceptions
-
◆ addTestFiles()
PHPUnit\Framework\TestSuite::addTestFiles |
( |
iterable |
$fileNames | ) |
|
Wrapper for addTestFile() that adds multiple test files.
- Exceptions
-
◆ addTestMethod()
PHPUnit\Framework\TestSuite::addTestMethod |
( |
\ReflectionClass |
$class, |
|
|
\ReflectionMethod |
$method |
|
) |
| |
|
protected |
◆ addTestSuite()
PHPUnit\Framework\TestSuite::addTestSuite |
( |
|
$testClass | ) |
|
Adds the tests from the given class to the suite.
- Parameters
-
object | string | $testClass | |
- Exceptions
-
◆ count()
PHPUnit\Framework\TestSuite::count |
( |
bool |
$preferCache = false | ) |
|
Counts the number of test cases that will be run by this test.
◆ createResult()
PHPUnit\Framework\TestSuite::createResult |
( |
| ) |
|
|
protected |
◆ getGroupDetails()
PHPUnit\Framework\TestSuite::getGroupDetails |
( |
| ) |
|
◆ getGroups()
PHPUnit\Framework\TestSuite::getGroups |
( |
| ) |
|
Returns the test groups of the suite.
◆ getIterator()
PHPUnit\Framework\TestSuite::getIterator |
( |
| ) |
|
Returns an iterator for this test suite.
◆ getName()
PHPUnit\Framework\TestSuite::getName |
( |
| ) |
|
Returns the name of the suite.
◆ injectFilter()
PHPUnit\Framework\TestSuite::injectFilter |
( |
Factory |
$filter | ) |
|
◆ markTestSuiteSkipped()
PHPUnit\Framework\TestSuite::markTestSuiteSkipped |
( |
|
$message = '' | ) |
|
Mark the test suite as skipped.
- Parameters
-
- Exceptions
-
◆ run()
PHPUnit\Framework\TestSuite::run |
( |
TestResult |
$result = null | ) |
|
◆ setBackupGlobals()
PHPUnit\Framework\TestSuite::setBackupGlobals |
( |
|
$backupGlobals | ) |
|
◆ setBackupStaticAttributes()
PHPUnit\Framework\TestSuite::setBackupStaticAttributes |
( |
|
$backupStaticAttributes | ) |
|
- Parameters
-
bool | $backupStaticAttributes | |
◆ setBeStrictAboutChangesToGlobalState()
PHPUnit\Framework\TestSuite::setBeStrictAboutChangesToGlobalState |
( |
|
$beStrictAboutChangesToGlobalState | ) |
|
- Parameters
-
bool | $beStrictAboutChangesToGlobalState | |
◆ setGroupDetails()
PHPUnit\Framework\TestSuite::setGroupDetails |
( |
array |
$groups | ) |
|
Set tests groups of the test case
◆ setName()
PHPUnit\Framework\TestSuite::setName |
( |
string |
$name | ) |
|
◆ setRunTestInSeparateProcess()
PHPUnit\Framework\TestSuite::setRunTestInSeparateProcess |
( |
bool |
$runTestInSeparateProcess | ) |
|
◆ setTests()
PHPUnit\Framework\TestSuite::setTests |
( |
array |
$tests | ) |
|
Set tests of the test suite
- Parameters
-
◆ testAt()
PHPUnit\Framework\TestSuite::testAt |
( |
int |
$index | ) |
|
Returns the test at the given index.
- Returns
- false|Test
◆ tests()
PHPUnit\Framework\TestSuite::tests |
( |
| ) |
|
Returns the tests as an enumeration.
- Returns
- Test[]
◆ toString()
PHPUnit\Framework\TestSuite::toString |
( |
| ) |
|
◆ $backupGlobals
PHPUnit\Framework\TestSuite::$backupGlobals |
|
protected |
◆ $backupStaticAttributes
PHPUnit\Framework\TestSuite::$backupStaticAttributes |
|
protected |
◆ $foundClasses
PHPUnit\Framework\TestSuite::$foundClasses = [] |
|
protected |
◆ $groups
PHPUnit\Framework\TestSuite::$groups = [] |
|
protected |
◆ $name
PHPUnit\Framework\TestSuite::$name = '' |
|
protected |
◆ $numTests
PHPUnit\Framework\TestSuite::$numTests = -1 |
|
protected |
◆ $runTestInSeparateProcess
PHPUnit\Framework\TestSuite::$runTestInSeparateProcess = false |
|
protected |
◆ $testCase
PHPUnit\Framework\TestSuite::$testCase = false |
|
protected |
◆ $tests
PHPUnit\Framework\TestSuite::$tests = [] |
|
protected |
The documentation for this class was generated from the following file: