PHP Класс Mutagenesis\Runner\RunnerAbstract

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_adapter Mutagenesis\Adapter\AdapterAbstract 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 Mutagenesis\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 Mutagenesis\Renderer\Text Instance of a suitable renderer used to format results into output
$_rendererName string Name of the renderer, e.g. text, to utilise
$_runkit Mutagenesis\Utility\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.

Открытые методы

Метод Описание
execute ( ) : void Execute the runner
getAdapter ( ) : AdapterAbstract 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 ( ) : Generator 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 ( AdapterAbstract $adapter ) 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 ( Generator $generator ) 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 ( Runkit $runkit ) 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

Описание методов

execute() абстрактный публичный Метод

Execute the runner
abstract public execute ( ) : void
Результат void

getAdapter() публичный Метод

Get a test framework adapter. Creates a new one based on the configured adapter name passed on the CLI if not already set.
public getAdapter ( ) : AdapterAbstract
Результат Mutagenesis\Adapter\AdapterAbstract

getAdapterConstraint() публичный Метод

Get name of the test adapter to use
public getAdapterConstraint ( ) : string
Результат string

getAdapterName() публичный Метод

Get name of the test adapter to use
public getAdapterName ( ) : string
Результат string

getAdapterOptions() публичный Метод

Get a space delimited string of testing tool options
public getAdapterOptions ( ) : string
Результат string

getBaseDirectory() публичный Метод

Get the base directory of the project being mutated
public getBaseDirectory ( ) : string
Результат string

getBootstrap() публичный Метод

Get a bootstrap file included before tests run
public getBootstrap ( ) : string
Результат string

getCacheDirectory() публичный Метод

Get the cache directory of the project being mutated
public getCacheDirectory ( ) : string
Результат string

getDetailCaptures() публичный Метод

Get flag to add detailed reports (including test results) about the mutations which caused test failures (i.e. captured)
public getDetailCaptures ( ) : boolean
Результат boolean

getGenerator() публичный Метод

Get a specific Generator of mutations.
public getGenerator ( ) : Generator
Результат Mutagenesis\Generator

getMutables() публичный Метод

Generate Mutants!
public getMutables ( ) : array
Результат array

getOptions() публичный Метод

Compile all necessary options for the test framework adapter
public getOptions ( ) : array
Результат array

getRenderer() публичный Метод

Get a result renderer. Creates a new one based on the configured renderer name passed on the CLI if not already set.
public getRenderer ( ) : Mutagenesis\Renderer\RendererInterface
Результат Mutagenesis\Renderer\RendererInterface

getRendererName() публичный Метод

Get name of the renderer to use
public getRendererName ( ) : string
Результат string

getRunkit() публичный Метод

Creates and returns a new instance of \Mutagenesis\Runkit if not previously loaded
public getRunkit ( ) : Mutagenesis\Runkit
Результат Mutagenesis\Runkit

getSourceDirectory() публичный Метод

Get the source directory of the project being mutated
public getSourceDirectory ( ) : string
Результат string

getTestDirectory() публичный Метод

Get the test directory of the project being mutated
public getTestDirectory ( ) : string
Результат string

getTimeout() публичный Метод

Get timeout in seconds for each test run
public getTimeout ( ) : null | integer
Результат null | integer

setAdapter() публичный Метод

Set a test framework adapter.
public setAdapter ( AdapterAbstract $adapter )
$adapter Mutagenesis\Adapter\AdapterAbstract

setAdapterConstraint() публичный Метод

Set name of the test adapter to use
public setAdapterConstraint ( $constraint )

setAdapterName() публичный Метод

Set name of the test adapter to use
public setAdapterName ( string $adapter )
$adapter string

setAdapterOption() публичный Метод

Options to pass to adapter's underlying command
public setAdapterOption ( string $optionString )
$optionString string

setAdapterOptions() публичный Метод

Set many options for adapter's underlying cli command
public setAdapterOptions ( array | string $options ) : self
$options array | string Array or serialized array of options
Результат self

setBaseDirectory() публичный Метод

Set the base directory of the project being mutated
public setBaseDirectory ( string $dir )
$dir string

setBootstrap() публичный Метод

Set a bootstrap file included before tests run (e.g. setup autoloading)
public setBootstrap ( string $file )
$file string

setCacheDirectory() публичный Метод

Set the cache directory of the project being mutated
public setCacheDirectory ( string $dir )
$dir string

setDetailCaptures() публичный Метод

Set flag to add detailed reports (including test results) about the mutations which caused test failures (i.e. captured)
public setDetailCaptures ( boolean $bool )
$bool boolean

setGenerator() публичный Метод

TODO Add interface
public setGenerator ( Generator $generator )
$generator Mutagenesis\Generator

setOption() публичный Метод

Set a generic option
public setOption ( string $name, mixed $value )
$name string
$value mixed

setOptions() публичный Метод

Set generic options
public setOptions ( array $options )
$options array

setRenderer() публичный Метод

Set a test framework adapter.
public setRenderer ( Mutagenesis\Renderer\RendererInterface $renderer )
$renderer Mutagenesis\Renderer\RendererInterface

setRendererName() публичный Метод

Set name of the renderer to use
public setRendererName ( string $rname )
$rname string

setRunkit() публичный Метод

Set a custom runkit instance.
public setRunkit ( Runkit $runkit )
$runkit Mutagenesis\Utility\Runkit

setSourceDirectory() публичный Метод

Set the source directory of the project being mutated
public setSourceDirectory ( string $dir )
$dir string

setTestDirectory() публичный Метод

Set the test directory of the project being mutated
public setTestDirectory ( string $dir )
$dir string

setTimeout() публичный Метод

Set timeout in seconds for each test run
public setTimeout ( integer $timeout )
$timeout integer

Описание свойств

$_adapter защищенное свойство

Instance of \Mutagenesis\Adapter\AdapterAbstract linking Mutagenesis to to an underlying test framework to execute tests and parse the test results
protected AdapterAbstract,Mutagenesis\Adapter $_adapter
Результат Mutagenesis\Adapter\AdapterAbstract

$_adapterConstraint защищенное свойство

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)
protected string $_adapterConstraint
Результат string

$_adapterName защищенное свойство

Name of the test adapter, e.g. phpunit, to utilise
protected string $_adapterName
Результат string

$_adapterOptions защищенное свойство

String of adapter options appended to any call to the current adapter's testing utility command (e.g. passing 'AllTests.php' to phpunit)
protected string $_adapterOptions
Результат string

$_baseDirectory защищенное свойство

Path to the base directory of the project being mutated
protected string $_baseDirectory
Результат string

$_bootstrap защищенное свойство

Test framework bootstrap
protected string $_bootstrap
Результат string

$_cacheDirectory защищенное свойство

Path to a cache directory used by library to store working files such as PHPUnit logs needed to analyse test case execution times.
protected string $_cacheDirectory
Результат string

$_detailCaptures защищенное свойство

Flag to add detailed reports (including test results) about the mutations which caused test failures (i.e. captured)
protected bool $_detailCaptures
Результат boolean

$_generator защищенное свойство

Instance of \Mutagenesis\Generator used to generate mutations from the underlying source code
protected Generator,Mutagenesis $_generator
Результат Mutagenesis\Generator

$_mutables защищенное свойство

Stored mutables each containing relevant mutations for the source code being tested
protected array $_mutables
Результат array

$_options защищенное свойство

Generic options, possibly of future use to other test frameworks
protected array $_options
Результат array

$_renderer защищенное свойство

Instance of a suitable renderer used to format results into output
protected Text,Mutagenesis\Renderer $_renderer
Результат Mutagenesis\Renderer\Text

$_rendererName защищенное свойство

Name of the renderer, e.g. text, to utilise
protected string $_rendererName
Результат string

$_runkit защищенное свойство

Instance of \Mutagenesis\Runkit used to apply and reverse mutations on loaded source code within the same process dynamically
protected Runkit,Mutagenesis\Utility $_runkit
Результат Mutagenesis\Utility\Runkit

$_sourceDirectory защищенное свойство

Path to the source directory of the project being mutated
protected string $_sourceDirectory
Результат string

$_testDirectory защищенное свойство

Path to the tests directory of the project being mutated
protected string $_testDirectory
Результат string

$_timeout защищенное свойство

Timeout in seconds allowed per test execution.
protected int $_timeout
Результат integer