Hal\MutaTesting\Runner\Adapter\BaseAdapter::__construct PHP Method

__construct() public method

public __construct ( $binary, $testDirectory, array $options = [], Hal\MutaTesting\Runner\Process\ProcessManagerInterface $processManager = null )
$options array
$processManager Hal\MutaTesting\Runner\Process\ProcessManagerInterface
    public function __construct($binary, $testDirectory, array $options = array(), ProcessManagerInterface $processManager = null)
    {
        $this->binary = $binary;
        $this->options = $options;
        $this->processManager = $processManager;
        $this->testDirectory = $testDirectory;
    }

Usage Example

Example #1
0
 public function __construct($binary, $testDirectory, array $options = array(), ProcessManagerInterface $processManager = null)
 {
     if (null !== $testDirectory) {
         $options = array_merge($options, array(sprintf('-d %s', $testDirectory)));
     }
     if (preg_match('!phar$!i', $binary) && !preg_match('!^php\\s+!', $binary)) {
         $binary = 'php ' . $binary;
     }
     parent::__construct($binary, null, $options, $processManager);
 }