PHPUnit_Framework_TestSuite_DataProvider
class PHPUnit_Framework_TestSuite_DataProvider extends PHPUnit_Framework_TestSuite (View source)
Properties
protected bool | $backupGlobals | Enable or disable the backup and restoration of the $GLOBALS array. | from PHPUnit_Framework_TestSuite |
protected bool | $backupStaticAttributes | Enable or disable the backup and restoration of static attributes. | from PHPUnit_Framework_TestSuite |
protected bool | $runTestInSeparateProcess | from PHPUnit_Framework_TestSuite | |
protected string | $name | The name of the test suite. | from PHPUnit_Framework_TestSuite |
protected array | $groups | The test groups of the test suite. | from PHPUnit_Framework_TestSuite |
protected array | $tests | The tests in the test suite. | from PHPUnit_Framework_TestSuite |
protected int | $numTests | The number of tests in the test suite. | from PHPUnit_Framework_TestSuite |
protected bool | $testCase | from PHPUnit_Framework_TestSuite | |
protected array | $foundClasses | from PHPUnit_Framework_TestSuite |
Methods
Constructs a new TestSuite:
Returns a string representation of the test suite.
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.
Counts the number of test cases that will be run by this test.
Creates a default TestResult object.
Runs the tests and collects their result in a TestResult.
No description
Returns the test at the given index.
Mark the test suite as skipped.
No description
No description
No description
No description
No description
Returns an iterator for this test suite.
Template Method that is called before the tests of this test suite are run.
Template Method that is called after the tests of this test suite have finished running.
Sets the dependencies of a TestCase.
Details
__construct(mixed $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.
string
toString()
Returns a string representation of the test suite.
addTest(PHPUnit_Framework_Test $test, array $groups = [])
Adds a test to the suite.
addTestSuite(mixed $testClass)
Adds the tests from the given class to the suite.
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.
addTestFiles(array|Iterator $filenames)
Wrapper for addTestFile() that adds multiple test files.
int
count(bool $preferCache = false)
Counts the number of test cases that will be run by this test.
static PHPUnit_Framework_Test
createTest(ReflectionClass $theClass, string $name)
protected PHPUnit_Framework_TestResult
createResult()
Creates a default TestResult object.
string
getName()
Returns the name of the suite.
array
getGroups()
Returns the test groups of the suite.
getGroupDetails()
setGroupDetails(array $groups)
Set tests groups of the test case
PHPUnit_Framework_TestResult
run(PHPUnit_Framework_TestResult $result = null)
Runs the tests and collects their result in a TestResult.
setRunTestInSeparateProcess(bool $runTestInSeparateProcess)
runTest(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result)
deprecated
deprecated
Runs a test.
setName(string $name)
Sets the name of the suite.
PHPUnit_Framework_Test
testAt(int|false $index)
Returns the test at the given index.
array
tests()
Returns the tests as an enumeration.
setTests(array $tests)
Set tests of the test suite
markTestSuiteSkipped(string $message = '')
Mark the test suite as skipped.
protected
addTestMethod(ReflectionClass $class, ReflectionMethod $method)
static bool
isTestMethod(ReflectionMethod $method)
static protected PHPUnit_Framework_WarningTestCase
warning(string $message)
static protected PHPUnit_Framework_SkippedTestCase
skipTest(string $class, string $methodName, string $message)
static protected PHPUnit_Framework_IncompleteTestCase
incompleteTest(string $class, string $methodName, string $message)
setbeStrictAboutChangesToGlobalState(bool $beStrictAboutChangesToGlobalState)
setBackupGlobals(bool $backupGlobals)
setBackupStaticAttributes(bool $backupStaticAttributes)
RecursiveIteratorIterator
getIterator()
Returns an iterator for this test suite.
injectFilter(PHPUnit_Runner_Filter_Factory $filter)
protected
setUp()
Template Method that is called before the tests of this test suite are run.
protected
tearDown()
Template Method that is called after the tests of this test suite have finished running.
at line 18
setDependencies(array $dependencies)
Sets the dependencies of a TestCase.