PHP Класс Mutagenesis\Adapter\Phpunit

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

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

Метод Описание
execute ( string $jobScript ) : string Execute the generated job which is to call the static main method.
main ( array $arguments, $mutation = null, $bootstrap = null ) : void Uses an instance of PHPUnit_TextUI_Command to execute the PHPUnit tests and simulates any Mutagenesis supported command line options suitable for PHPUnit. At present, we merely dissect a generic 'options' string equivelant to anything typed into a console after a normal 'phpunit' command. The adapter captures the TextUI output for further processing.
processOutput ( string $output ) : boolean Parse the PHPUnit text result output to see if there were any failures.
runTests ( Base $runner, boolean $useStdout = true, boolean $firstRun = false, array $mutation = [], array $testCases = [] ) : array Runs the tests suite according to Runner set options and the execution order of test case (if any). It then returns an array of two elements.

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

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

Execute the generated job which is to call the static main method.
public static execute ( string $jobScript ) : string
$jobScript string
Результат string $output

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

To prevent duplication of output from stdout, PHPUnit is hard configured to write to stderrm(stdin is used in proc_open call)
public static main ( array $arguments, $mutation = null, $bootstrap = null ) : void
$arguments array Mutagenesis arguments to pass to PHPUnit
Результат void

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

In the context of mutation testing, a test failure is good (i.e. the mutation was detected by the test suite).
public static processOutput ( string $output ) : boolean
$output string
Результат boolean

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

First element is a boolean result value indicating if tests passed or not. Second element is an array containing the key "stdout" which stores the output from the last test run.
public runTests ( Base $runner, boolean $useStdout = true, boolean $firstRun = false, array $mutation = [], array $testCases = [] ) : array
$runner Mutagenesis\Runner\Base
$useStdout boolean
$firstRun boolean
$mutation array
$testCases array
Результат array