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)
 boolean isHidden (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:
isHidden (line 82)

Tests for hidden files so as to skip them. Currently only tests for Unix hidden files.

  • return: True if hidden file.
  • access: protected
boolean isHidden (string $filename)
  • string $filename: Plain filename.
removeTrailingSlash (line 26)

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

  • return: Path without trailing slash.
  • access: protected
string removeTrailingSlash (string $path)
  • string $path: Path to normalise.

Documentation generated on Sun, 31 Oct 2010 16:31:01 -0500 by phpDocumentor 1.4.3