Class SimpleFileLoader

Description

Helps to extract test cases automatically from a file.

Located in /test_case.php (line 368)


	
			
Method Summary
 TestSuite createSuiteFromClasses (string $title, array $classes)
 TestSuite load (string $test_file)
 void makeFileVariablesGlobal (hash $existing, hash $new)
 void scrapeClassesFromFile (string $test_file)
 array selectRunnableTests (array $candidates)
Methods
createSuiteFromClasses (line 453)

Builds a test suite from a class list.

  • return: Group loaded with the new test cases.
  • access: public
TestSuite createSuiteFromClasses (string $title, array $classes)
  • string $title: Title of new group.
  • array $classes: Test classes.
load (line 378)

Builds a test suite from a library of test cases.

The new suite is composed into this one.

  • return: The new test suite.
  • access: public
TestSuite load (string $test_file)
  • string $test_file: File name of library with test case classes.
makeFileVariablesGlobal (line 398)

Imports new variables into the global namespace.

  • access: protected
void makeFileVariablesGlobal (hash $existing, hash $new)
  • hash $existing: Variables before the file was loaded.
  • hash $new: Variables after the file was loaded.
scrapeClassesFromFile (line 415)

Lookup classnames from file contents, in case the file may have been included before.

Note: This is probably too clever by half. Figuring this out after a failed test case is going to be tricky for us, never mind the user. A test case should not be included twice anyway.

  • access: protected
void scrapeClassesFromFile (string $test_file)
  • string $test_file: File name with classes.
selectRunnableTests (line 430)

Calculates the incoming test cases. Skips abstract and ignored classes.

  • return: New classes which are test cases that shouldn't be ignored.
  • access: public
array selectRunnableTests (array $candidates)
  • array $candidates: Candidate classes.

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