You Are Here: Home Documentation API Reference discoverTests

Enhance PHP Unit Testing And Mocking Framework improve the quality

discoverTests

\Enhance\Core::discoverTests($directory, $recursive, $exclusions);

Runs auto-discovery of tests in the supplied directory.

Parameters

String $directory

The folder to start the search in, for example '.' for the current directory, or 'tests' for a directory named "tests".

Bool $recursive

Whether to continue the search in sub-folders of the start directory (and so on).

Array $exclusions

An array of folders to exclude, such as source-control folders or specific folders you do not want to scan.

Example Usage

\Enhance\Core::discoverTests('.', true, array('.svn', 'Temp'));