Property | Type | Description | |
---|---|---|---|
$backupGlobals | boolean | Enable or disable the backup and restoration of the $GLOBALS array. | |
$backupStaticAttributes | boolean | Enable or disable the backup and restoration of static attributes. | |
$foundClasses | array | ||
$groups | array | The test groups of the test suite. | |
$name | string | The name of the test suite. | |
$numTests | integer | The number of tests in the test suite. | |
$runTestInSeparateProcess | boolean | ||
$testCase | boolean | ||
$tests | array | The tests in the test suite. |
Method | Description | |
---|---|---|
__construct ( mixed $theClass = '', string $name = '' ) | Constructs a new TestSuite: | |
addTest ( PHPUnit_Framework_Test $test, array $groups = [] ) | Adds a test to the suite. | |
addTestFile ( string $filename ) |
Wraps both addTest() and addTestSuite
as well as the separate import statements for the user's convenience. |
|
addTestFiles ( array | Iterator $filenames ) | Wrapper for addTestFile() that adds multiple test files. | |
addTestSuite ( mixed $testClass ) | Adds the tests from the given class to the suite. | |
count ( boolean $preferCache = false ) : integer | Counts the number of test cases that will be run by this test. | |
createTest ( ReflectionClass $theClass, string $name ) : PHPUnit_Framework_Test | ||
getGroupDetails ( ) | ||
getGroups ( ) : array | Returns the test groups of the suite. | |
getIterator ( ) : RecursiveIteratorIterator | Returns an iterator for this test suite. | |
getName ( ) : string | Returns the name of the suite. | |
injectFilter ( PHPUnit_Runner_Filter_Factory $filter ) | ||
isTestMethod ( ReflectionMethod $method ) : boolean | ||
markTestSuiteSkipped ( string $message = '' ) | Mark the test suite as skipped. | |
run ( PHPUnit_Framework_TestResult $result = null ) : PHPUnit_Framework_TestResult | Runs the tests and collects their result in a TestResult. | |
runTest ( PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result ) | Runs a test. | |
setBackupGlobals ( boolean $backupGlobals ) | ||
setBackupStaticAttributes ( boolean $backupStaticAttributes ) | ||
setGroupDetails ( array $groups ) | Set tests groups of the test case | |
setName ( $name ) | Sets the name of the suite. | |
setRunTestInSeparateProcess ( boolean $runTestInSeparateProcess ) | ||
setTests ( array $tests ) | Set tests of the test suite | |
setbeStrictAboutChangesToGlobalState ( boolean $beStrictAboutChangesToGlobalState ) | ||
testAt ( $index ) : PHPUnit_Framework_Test | Returns the test at the given index. | |
tests ( ) : array | Returns the tests as an enumeration. | |
toString ( ) : string | Returns a string representation of the test suite. |
Method | Description | |
---|---|---|
addTestMethod ( ReflectionClass $class, ReflectionMethod $method ) | ||
createResult ( ) : PHPUnit_Framework_TestResult | Creates a default TestResult object. | |
incompleteTest ( string $class, string $methodName, string $message ) : PHPUnit_Framework_IncompleteTestCase | ||
setUp ( ) | Template Method that is called before the tests of this test suite are run. | |
skipTest ( string $class, string $methodName, string $message ) : PHPUnit_Framework_SkippedTestCase | ||
tearDown ( ) | Template Method that is called after the tests of this test suite have finished running. | |
warning ( string $message ) : PHPUnit_Framework_WarningTestCase |
public __construct ( mixed $theClass = '', string $name = '' ) | ||
$theClass | mixed | |
$name | string |
PHPUnit_Framework_WarningTestCase
will be created instead,
leaving the current test run untouched. public addTestFile ( string $filename ) | ||
$filename | string |
public addTestFiles ( array | Iterator $filenames ) | ||
$filenames | array | Iterator |
protected addTestMethod ( ReflectionClass $class, ReflectionMethod $method ) | ||
$class | ReflectionClass | |
$method | ReflectionMethod |
public addTestSuite ( mixed $testClass ) | ||
$testClass | mixed |
protected createResult ( ) : PHPUnit_Framework_TestResult | ||
return | PHPUnit_Framework_TestResult |
public static createTest ( ReflectionClass $theClass, string $name ) : PHPUnit_Framework_Test | ||
$theClass | ReflectionClass | |
$name | string | |
return | PHPUnit_Framework_Test |
public getIterator ( ) : RecursiveIteratorIterator | ||
return | RecursiveIteratorIterator |
public injectFilter ( PHPUnit_Runner_Filter_Factory $filter ) | ||
$filter | PHPUnit_Runner_Filter_Factory |
public static isTestMethod ( ReflectionMethod $method ) : boolean | ||
$method | ReflectionMethod | |
return | boolean |
public markTestSuiteSkipped ( string $message = '' ) | ||
$message | string |
public run ( PHPUnit_Framework_TestResult $result = null ) : PHPUnit_Framework_TestResult | ||
$result | PHPUnit_Framework_TestResult | |
return | PHPUnit_Framework_TestResult |
public runTest ( PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result ) | ||
$test | PHPUnit_Framework_Test | |
$result | PHPUnit_Framework_TestResult |
public setBackupGlobals ( boolean $backupGlobals ) | ||
$backupGlobals | boolean |
public setBackupStaticAttributes ( boolean $backupStaticAttributes ) | ||
$backupStaticAttributes | boolean |
public setGroupDetails ( array $groups ) | ||
$groups | array |
public setRunTestInSeparateProcess ( boolean $runTestInSeparateProcess ) | ||
$runTestInSeparateProcess | boolean |
protected setUp ( ) |
public setbeStrictAboutChangesToGlobalState ( boolean $beStrictAboutChangesToGlobalState ) | ||
$beStrictAboutChangesToGlobalState | boolean |
protected tearDown ( ) |
public testAt ( $index ) : PHPUnit_Framework_Test | ||
return | PHPUnit_Framework_Test |
protected bool $backupGlobals | ||
return | boolean |
protected bool $backupStaticAttributes | ||
return | boolean |
protected int $numTests | ||
return | integer |
protected bool $runTestInSeparateProcess | ||
return | boolean |