Public Member Functions | |
TestSuite ($label=false) | |
getLabel () | |
addTestCase (&$test_case) | |
addTestClass ($class) | |
add (&$test_case) | |
addTestFile ($test_file) | |
addFile ($test_file) | |
collect ($path, &$collector) | |
run (&$reporter) | |
getSize () | |
Static Public Member Functions | |
getBaseTestCase ($class) | |
Public Attributes | |
$_label | |
$_test_cases |
Definition at line 390 of file test_case.php.
TestSuite::TestSuite | ( | $ | label = false |
) |
Sets the name of the test suite.
string | $label Name sent at the start and end of the test. public |
Definition at line 400 of file test_case.php.
Referenced by DrupalTestSuite::DrupalTestSuite().
TestSuite::getLabel | ( | ) |
Accessor for the test name for subclasses. If the suite wraps a single test case the label defaults to the name of that test.
Definition at line 411 of file test_case.php.
References getSize().
Referenced by run().
TestSuite::addTestCase | ( | &$ | test_case | ) |
TestSuite::addTestClass | ( | $ | class | ) |
Definition at line 430 of file test_case.php.
References getBaseTestCase().
TestSuite::add | ( | &$ | test_case | ) |
Adds a test into the suite by instance or class. The class will be instantiated if it's a test suite.
SimpleTestCase | $test_case Suite or individual test case implementing the runnable test interface. public |
Definition at line 447 of file test_case.php.
References getBaseTestCase().
TestSuite::addTestFile | ( | $ | test_file | ) |
Definition at line 462 of file test_case.php.
References addFile().
TestSuite::addFile | ( | $ | test_file | ) |
Builds a test suite from a library of test cases. The new suite is composed into this one.
string | $test_file File name of library with test case classes. public |
Definition at line 473 of file test_case.php.
Referenced by addTestFile().
TestSuite::collect | ( | $ | path, | |
&$ | collector | |||
) |
Delegates to a visiting collector to add test files.
string | $path Path to scan from. | |
SimpleCollector | $collector Directory scanner. public |
Definition at line 485 of file test_case.php.
TestSuite::run | ( | &$ | reporter | ) |
Invokes run() on all of the held test cases, instantiating them if necessary.
SimpleReporter | $reporter Current test reporter. public |
Reimplemented in DrupalTests.
Definition at line 495 of file test_case.php.
References getLabel(), and getSize().
TestSuite::getSize | ( | ) |
Number of contained test cases.
Definition at line 517 of file test_case.php.
Referenced by getLabel(), and run().
TestSuite::getBaseTestCase | ( | $ | class | ) | [static] |
Test to see if a class is derived from the SimpleTestCase class.
string | $class Class name. public |
Definition at line 537 of file test_case.php.
Referenced by add(), addTestClass(), and SimpleFileLoader::selectRunnableTests().
TestSuite::$_label |
Definition at line 391 of file test_case.php.
TestSuite::$_test_cases |
Definition at line 392 of file test_case.php.