PHP Class Hal\MutaTesting\Runner\Adapter\BaseAdapter

Inheritance: implements Hal\MutaTesting\Runner\Adapter\AdapterInterface
ファイルを表示 Open project: halleck45/mutatesting Class Usage Examples

Protected Properties

Property Type Description
$binary
$options
$processManager
$testDirectory

Public Methods

Method Description
__construct ( $binary, $testDirectory, array $options = [], Hal\MutaTesting\Runner\Process\ProcessManagerInterface $processManager = null )
createFileSystemMock ( Hal\MutaTesting\Mutation\MutationInterface $mutation ) : string create a bootstrapper to mock file system: the file mentionned in the mutation will be virtualized in the application and replaced with own mutated file
getBinary ( ) : string Get the binary used to run tests
getLastCommand ( )
getOptions ( ) : array Get default options used to run tests
getSuiteResult ( string $logPath ) : Hal\MutaTesting\Test\UnitCollectionInterface Get results of unit test suites by the file where the junit result is logged
getTestDirectory ( ) : string Get the directory where test (root) are located
parseTestedFiles ( Hal\MutaTesting\Test\UnitInterface &$unit )
run ( string $path = null, array $options = [], string $logFile = null, string $prependFile = null, callable $callback = null ) : string Run tests
runMutation ( Hal\MutaTesting\Mutation\MutationInterface &$mutation, $options = [], $logFile = null, $prependFile = null, callable $callback = null ) : Hal\MutaTesting\Test\UnitInterface Runs a mutation
runTests ( Hal\MutaTesting\Test\UnitCollectionInterface $collection, array $options = [], string $logFile = null, string $prependFile = null ) Run specific tests
setProcessManager ( Hal\MutaTesting\Runner\Process\ProcessManagerInterface $processManager )

Method Details

__construct() public method

public __construct ( $binary, $testDirectory, array $options = [], Hal\MutaTesting\Runner\Process\ProcessManagerInterface $processManager = null )
$options array
$processManager Hal\MutaTesting\Runner\Process\ProcessManagerInterface

createFileSystemMock() public method

create a bootstrapper to mock file system: the file mentionned in the mutation will be virtualized in the application and replaced with own mutated file
public createFileSystemMock ( Hal\MutaTesting\Mutation\MutationInterface $mutation ) : string
$mutation Hal\MutaTesting\Mutation\MutationInterface
return string

getBinary() public method

Get the binary used to run tests
public getBinary ( ) : string
return string

getLastCommand() public method

public getLastCommand ( )

getOptions() public method

Get default options used to run tests
public getOptions ( ) : array
return array

getSuiteResult() public method

Get results of unit test suites by the file where the junit result is logged
public getSuiteResult ( string $logPath ) : Hal\MutaTesting\Test\UnitCollectionInterface
$logPath string
return Hal\MutaTesting\Test\UnitCollectionInterface

getTestDirectory() public method

Get the directory where test (root) are located
public getTestDirectory ( ) : string
return string

parseTestedFiles() public method

public parseTestedFiles ( Hal\MutaTesting\Test\UnitInterface &$unit )
$unit Hal\MutaTesting\Test\UnitInterface

run() public method

Run tests
public run ( string $path = null, array $options = [], string $logFile = null, string $prependFile = null, callable $callback = null ) : string
$path string
$options array
$logFile string
$prependFile string
$callback callable
return string $output

runMutation() public method

Runs a mutation
public runMutation ( Hal\MutaTesting\Mutation\MutationInterface &$mutation, $options = [], $logFile = null, $prependFile = null, callable $callback = null ) : Hal\MutaTesting\Test\UnitInterface
$mutation Hal\MutaTesting\Mutation\MutationInterface
$callback callable
return Hal\MutaTesting\Test\UnitInterface

runTests() public method

Run specific tests
See also: Adapter::run()
public runTests ( Hal\MutaTesting\Test\UnitCollectionInterface $collection, array $options = [], string $logFile = null, string $prependFile = null )
$collection Hal\MutaTesting\Test\UnitCollectionInterface
$options array
$logFile string
$prependFile string

setProcessManager() public method

public setProcessManager ( Hal\MutaTesting\Runner\Process\ProcessManagerInterface $processManager )
$processManager Hal\MutaTesting\Runner\Process\ProcessManagerInterface

Property Details

$binary protected_oe property

protected $binary

$options protected_oe property

protected $options

$processManager protected_oe property

protected $processManager

$testDirectory protected_oe property

protected $testDirectory