Property | Type | Description | |
---|---|---|---|
$_adapter | Instance of \Mutagenesis\Adapter\AdapterAbstract linking Mutagenesis to to an underlying test framework to execute tests and parse the test results | ||
$_adapterConstraint | string | Adapter constraint. Used in initial run to analyse what tests/cases/suites are to be executed. For example, calling "phpunit MyTests MyTests.php" sets a constraint of "MyTests MyTests.php". Used to narrow the focus of the current mutation testing run if needed (e.g. spreading testing over time) | |
$_adapterName | string | Name of the test adapter, e.g. phpunit, to utilise | |
$_adapterOptions | string | String of adapter options appended to any call to the current adapter's testing utility command (e.g. passing 'AllTests.php' to phpunit) | |
$_baseDirectory | string | Path to the base directory of the project being mutated | |
$_bootstrap | string | Test framework bootstrap | |
$_cacheDirectory | string | Path to a cache directory used by library to store working files such as PHPUnit logs needed to analyse test case execution times. | |
$_detailCaptures | boolean | Flag to add detailed reports (including test results) about the mutations which caused test failures (i.e. captured) | |
$_generator | Instance of \Mutagenesis\Generator used to generate mutations from the underlying source code | ||
$_mutables | array | Stored mutables each containing relevant mutations for the source code being tested | |
$_options | array | Generic options, possibly of future use to other test frameworks | |
$_renderer | Instance of a suitable renderer used to format results into output | ||
$_rendererName | string | Name of the renderer, e.g. text, to utilise | |
$_runkit | Instance of \Mutagenesis\Runkit used to apply and reverse mutations on loaded source code within the same process dynamically | ||
$_sourceDirectory | string | Path to the source directory of the project being mutated | |
$_testDirectory | string | Path to the tests directory of the project being mutated | |
$_timeout | integer | Timeout in seconds allowed per test execution. |
Method | Description | |
---|---|---|
execute ( ) : void | Execute the runner | |
getAdapter ( ) : |
Get a test framework adapter. Creates a new one based on the configured adapter name passed on the CLI if not already set. | |
getAdapterConstraint ( ) : string | Get name of the test adapter to use | |
getAdapterName ( ) : string | Get name of the test adapter to use | |
getAdapterOptions ( ) : string | Get a space delimited string of testing tool options | |
getBaseDirectory ( ) : string | Get the base directory of the project being mutated | |
getBootstrap ( ) : string | Get a bootstrap file included before tests run | |
getCacheDirectory ( ) : string | Get the cache directory of the project being mutated | |
getDetailCaptures ( ) : boolean | Get flag to add detailed reports (including test results) about the mutations which caused test failures (i.e. captured) | |
getGenerator ( ) : |
Get a specific Generator of mutations. | |
getMutables ( ) : array | Generate Mutants! | |
getOptions ( ) : array | Compile all necessary options for the test framework adapter | |
getRenderer ( ) : Mutagenesis\Renderer\RendererInterface | Get a result renderer. Creates a new one based on the configured renderer name passed on the CLI if not already set. | |
getRendererName ( ) : string | Get name of the renderer to use | |
getRunkit ( ) : Mutagenesis\Runkit | Creates and returns a new instance of \Mutagenesis\Runkit if not previously loaded | |
getSourceDirectory ( ) : string | Get the source directory of the project being mutated | |
getTestDirectory ( ) : string | Get the test directory of the project being mutated | |
getTimeout ( ) : null | integer | Get timeout in seconds for each test run | |
setAdapter ( |
Set a test framework adapter. | |
setAdapterConstraint ( $constraint ) | Set name of the test adapter to use | |
setAdapterName ( string $adapter ) | Set name of the test adapter to use | |
setAdapterOption ( string $optionString ) | Options to pass to adapter's underlying command | |
setAdapterOptions ( array | string $options ) : self | Set many options for adapter's underlying cli command | |
setBaseDirectory ( string $dir ) | Set the base directory of the project being mutated | |
setBootstrap ( string $file ) | Set a bootstrap file included before tests run (e.g. setup autoloading) | |
setCacheDirectory ( string $dir ) | Set the cache directory of the project being mutated | |
setDetailCaptures ( boolean $bool ) | Set flag to add detailed reports (including test results) about the mutations which caused test failures (i.e. captured) | |
setGenerator ( |
Set a specific Generator of mutations (stuck with a subclass). | |
setOption ( string $name, mixed $value ) | Set a generic option | |
setOptions ( array $options ) | Set generic options | |
setRenderer ( Mutagenesis\Renderer\RendererInterface $renderer ) | Set a test framework adapter. | |
setRendererName ( string $rname ) | Set name of the renderer to use | |
setRunkit ( |
Set a custom runkit instance. | |
setSourceDirectory ( string $dir ) | Set the source directory of the project being mutated | |
setTestDirectory ( string $dir ) | Set the test directory of the project being mutated | |
setTimeout ( integer $timeout ) | Set timeout in seconds for each test run |
public getAdapter ( ) : |
||
return |
public getAdapterConstraint ( ) : string | ||
return | string |
public getAdapterName ( ) : string | ||
return | string |
public getAdapterOptions ( ) : string | ||
return | string |
public getBaseDirectory ( ) : string | ||
return | string |
public getBootstrap ( ) : string | ||
return | string |
public getCacheDirectory ( ) : string | ||
return | string |
public getDetailCaptures ( ) : boolean | ||
return | boolean |
public getGenerator ( ) : |
||
return |
public getOptions ( ) : array | ||
return | array |
public getRenderer ( ) : Mutagenesis\Renderer\RendererInterface | ||
return | Mutagenesis\Renderer\RendererInterface |
public getRendererName ( ) : string | ||
return | string |
public getRunkit ( ) : Mutagenesis\Runkit | ||
return | Mutagenesis\Runkit |
public getSourceDirectory ( ) : string | ||
return | string |
public getTestDirectory ( ) : string | ||
return | string |
public getTimeout ( ) : null | integer | ||
return | null | integer |
public setAdapter ( |
||
$adapter |
public setAdapterConstraint ( $constraint ) |
public setAdapterName ( string $adapter ) | ||
$adapter | string |
public setAdapterOption ( string $optionString ) | ||
$optionString | string |
public setAdapterOptions ( array | string $options ) : self | ||
$options | array | string | Array or serialized array of options |
return | self |
public setBaseDirectory ( string $dir ) | ||
$dir | string |
public setBootstrap ( string $file ) | ||
$file | string |
public setCacheDirectory ( string $dir ) | ||
$dir | string |
public setDetailCaptures ( boolean $bool ) | ||
$bool | boolean |
public setGenerator ( |
||
$generator |
public setRenderer ( Mutagenesis\Renderer\RendererInterface $renderer ) | ||
$renderer | Mutagenesis\Renderer\RendererInterface |
public setRendererName ( string $rname ) | ||
$rname | string |
public setRunkit ( |
||
$runkit |
public setSourceDirectory ( string $dir ) | ||
$dir | string |
public setTestDirectory ( string $dir ) | ||
$dir | string |
public setTimeout ( integer $timeout ) | ||
$timeout | integer |
protected AdapterAbstract,Mutagenesis\Adapter $_adapter | ||
return |
protected string $_adapterConstraint | ||
return | string |
protected string $_adapterName | ||
return | string |
protected string $_adapterOptions | ||
return | string |
protected string $_baseDirectory | ||
return | string |
protected string $_bootstrap | ||
return | string |
protected string $_cacheDirectory | ||
return | string |
protected bool $_detailCaptures | ||
return | boolean |
protected Generator,Mutagenesis $_generator | ||
return |
protected array $_mutables | ||
return | array |
protected array $_options | ||
return | array |
protected Text,Mutagenesis\Renderer $_renderer | ||
return |
protected string $_rendererName | ||
return | string |
protected Runkit,Mutagenesis\Utility $_runkit | ||
return |
protected string $_sourceDirectory | ||
return | string |
protected string $_testDirectory | ||
return | string |
protected int $_timeout | ||
return | integer |