TestSuite Class Reference

Inheritance diagram for TestSuite:
[legend]

List of all members.


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


Detailed Description

Definition at line 390 of file test_case.php.


Member Function Documentation

TestSuite::TestSuite ( label = false  ) 

Sets the name of the test suite.

Parameters:
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.

Returns:
string Name of the test. public

Definition at line 411 of file test_case.php.

References getSize().

Referenced by run().

Here is the call graph for this function:

TestSuite::addTestCase ( &$  test_case  ) 

Deprecated:

Definition at line 423 of file test_case.php.

Referenced by DrupalTests::DrupalTests().

TestSuite::addTestClass ( class  ) 

Deprecated:

Definition at line 430 of file test_case.php.

References getBaseTestCase().

Here is the call graph for this function:

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.

Parameters:
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().

Here is the call graph for this function:

TestSuite::addTestFile ( test_file  ) 

Deprecated:

Definition at line 462 of file test_case.php.

References addFile().

Here is the call graph for this function:

TestSuite::addFile ( test_file  ) 

Builds a test suite from a library of test cases. The new suite is composed into this one.

Parameters:
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.

Parameters:
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.

Parameters:
SimpleReporter $reporter Current test reporter. public

Reimplemented in DrupalTests.

Definition at line 495 of file test_case.php.

References getLabel(), and getSize().

Here is the call graph for this function:

TestSuite::getSize (  ) 

Number of contained test cases.

Returns:
integer Total count of cases in the group. public

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.

Parameters:
string $class Class name. public

Definition at line 537 of file test_case.php.

Referenced by add(), addTestClass(), and SimpleFileLoader::selectRunnableTests().


Member Data Documentation

TestSuite::$_label

Definition at line 391 of file test_case.php.

TestSuite::$_test_cases

Definition at line 392 of file test_case.php.


The documentation for this class was generated from the following file:

Generated on Mon Jun 2 15:09:15 2008 for SimpleTest by  1.5.5