Class SimpleCollector

Description

The basic collector for GroupTest

Located in /collector.php (line 19)


	
			
Direct descendents
Class Description
 class SimplePatternCollector An extension to SimpleCollector that only adds files matching a given pattern.
Method Summary
 void collect ( &$test, string $path, object $test)
 void _handle ( &$test,  $file, object $test, string $filename)
 string _removeTrailingSlash (string $path)
Methods
collect (line 42)

Scans the directory and adds what it can.

  • see: _attemptToAdd()
void collect ( &$test, string $path, object $test)
  • object $test: Group test with GroupTest::addTestFile() method.
  • string $path: Directory to scan.
  • &$test
_handle (line 68)

This method determines what should be done with a given file and adds it via GroupTest::addTestFile() if necessary.

This method should be overriden to provide custom matching criteria, such as pattern matching, recursive matching, etc. For an example, see SimplePatternCollector::_handle().

void _handle ( &$test,  $file, object $test, string $filename)
  • object $test: Group test with GroupTest::addTestFile() method.
  • string $filename: A filename as generated by collect()
  • &$test
  • $file

Redefined in descendants as:
_removeTrailingSlash (line 26)

Strips off any kind of slash at the end so as to normalise the path.

  • return: Path without trailing slash.
string _removeTrailingSlash (string $path)
  • string $path: Path to normalise.

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