PHP Class Mutagenesis\Console

Datei anzeigen Open project: padraic/mutagenesis Class Usage Examples

Protected Properties

Property Type Description
$_options array Options passed across the command line parsed by getopt()

Public Methods

Method Description
main ( array $options = null, RunnerAbstract $runner = null ) Sets up options, and initialises the Runner to perform mutation tests and echo out the results

Protected Methods

Method Description
setAdapterConstraint ( RunnerAbstract $runner ) Set Adapter Constraint. For example, you can constrain PHPUnit by passing the Test Case/Suite Class and/or Name to execute. e.g. phpunit AllTests.php (constraint is "AllTests.php")
setAdapterName ( RunnerAbstract $runner ) Set an adapter name to use for the provided runner. If none is provided, the PHPUnit adapter name is set by default.
setAdapterOptions ( RunnerAbstract $runner ) Set options to be parsed and passed to the adapter instance used by the runner
setBaseDirectory ( RunnerAbstract $runner ) Set a base directory for the provided runner
setBootstrap ( RunnerAbstract $runner ) Set the path to a bootstrap file used when testing. This allows for registering autoloaders and such, for example TestHelper.php or Bootstrap.php are common for PHPUnit.
setDetailCaptures ( RunnerAbstract $runner ) Set timeout in seconds to apply to each test run. The default timeout is 120 seconds.
setSourceDirectory ( RunnerAbstract $runner ) Set a source directory for the provided runner
setTestDirectory ( RunnerAbstract $runner ) Set a tests directory for the provided runner
setTimeout ( RunnerAbstract $runner ) Set timeout in seconds to apply to each test run. The default timeout is 120 seconds.

Method Details

main() public static method

Sets up options, and initialises the Runner to perform mutation tests and echo out the results
public static main ( array $options = null, RunnerAbstract $runner = null )
$options array
$runner Mutagenesis\Runner\RunnerAbstract Optional custom runner

setAdapterConstraint() protected static method

Set Adapter Constraint. For example, you can constrain PHPUnit by passing the Test Case/Suite Class and/or Name to execute. e.g. phpunit AllTests.php (constraint is "AllTests.php")
protected static setAdapterConstraint ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setAdapterName() protected static method

Set an adapter name to use for the provided runner. If none is provided, the PHPUnit adapter name is set by default.
protected static setAdapterName ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setAdapterOptions() protected static method

Set options to be parsed and passed to the adapter instance used by the runner
protected static setAdapterOptions ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setBaseDirectory() protected static method

Set a base directory for the provided runner
protected static setBaseDirectory ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setBootstrap() protected static method

Set the path to a bootstrap file used when testing. This allows for registering autoloaders and such, for example TestHelper.php or Bootstrap.php are common for PHPUnit.
protected static setBootstrap ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setDetailCaptures() protected static method

Set timeout in seconds to apply to each test run. The default timeout is 120 seconds.
protected static setDetailCaptures ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setSourceDirectory() protected static method

Set a source directory for the provided runner
protected static setSourceDirectory ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setTestDirectory() protected static method

Set a tests directory for the provided runner
protected static setTestDirectory ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

setTimeout() protected static method

Set timeout in seconds to apply to each test run. The default timeout is 120 seconds.
protected static setTimeout ( RunnerAbstract $runner )
$runner Mutagenesis\Runner\RunnerAbstract

Property Details

$_options protected_oe static_oe property

Options passed across the command line parsed by getopt()
protected static array $_options
return array