Class TestSuite

Description

This is a composite test class for combining test cases and other RunnableTest classes into a group test.

Located in /test_case.php (line 487)


	
			
Direct descendents
Class Description
 class GroupTest
Variable Summary
 mixed $_label
 mixed $_test_cases
Method Summary
 static void getBaseTestCase (string $class)
 TestSuite TestSuite ([string $label = false])
 void add ( &$test_case, SimpleTestCase $test_case)
 void addFile (string $test_file)
 void addTestCase ( &$test_case)
 void addTestClass ( $class)
 void addTestFile ( $test_file)
 void collect (string $path,  &$collector, SimpleCollector $collector)
 string getLabel ()
 integer getSize ()
 void run ( &$reporter, SimpleReporter $reporter)
Variables
mixed $_label (line 488)
mixed $_test_cases (line 489)
Methods
static getBaseTestCase (line 631)

Test to see if a class is derived from the SimpleTestCase class.

  • access: public
static void getBaseTestCase (string $class)
  • string $class: Class name.
Constructor TestSuite (line 497)

Sets the name of the test suite.

  • access: public
TestSuite TestSuite ([string $label = false])
  • string $label: Name sent at the start and end of the test.
add (line 543)

Adds a test into the suite by instance or class. The class will be instantiated if it's a test suite.

  • access: public
void add ( &$test_case, SimpleTestCase $test_case)
  • SimpleTestCase $test_case: Suite or individual test case implementing the runnable test interface.
  • &$test_case
addFile (line 567)

Builds a test suite from a library of test cases.

The new suite is composed into this one.

  • access: public
void addFile (string $test_file)
  • string $test_file: File name of library with test case classes.
addTestCase (line 520)
  • deprecated:
void addTestCase ( &$test_case)
  • &$test_case
addTestClass (line 527)
  • deprecated:
void addTestClass ( $class)
  • $class
addTestFile (line 556)
  • deprecated:
void addTestFile ( $test_file)
  • $test_file
collect (line 579)

Delegates to a visiting collector to add test files.

  • access: public
void collect (string $path,  &$collector, SimpleCollector $collector)
  • string $path: Path to scan from.
  • SimpleCollector $collector: Directory scanner.
  • &$collector
getLabel (line 508)

Accessor for the test name for subclasses. If the suite wraps a single test case the label defaults to the name of that test.

  • return: Name of the test.
  • access: public
string getLabel ()
getSize (line 610)

Number of contained test cases.

  • return: Total count of cases in the group.
  • access: public
integer getSize ()
run (line 589)

Invokes run() on all of the held test cases, instantiating them if necessary.

  • access: public
void run ( &$reporter, SimpleReporter $reporter)

Documentation generated on Sun, 04 May 2008 09:22:19 -0500 by phpDocumentor 1.3.0