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
Пример #1
0
 public function testAdapterDetectsFailedRun()
 {
     $runner = m::mock('\\Mutagenesis\\Runner\\Base');
     $runner->shouldReceive('getOptions')->andReturn(array('tests' => $this->root, 'clioptions' => array(), 'cache' => sys_get_temp_dir(), 'constraint' => ''));
     $runner->shouldReceive(array('getBootstrap' => null, 'getTimeout' => 1200));
     $adapter = new \Mutagenesis\Adapter\Phpunit();
     $result = $adapter->runTests($runner, true, true, array(), array(array('class' => 'PassTest', 'file' => 'SyntaxError.php')));
     $this->assertEquals(\Mutagenesis\Adapter\Phpunit::PROCESS_FAILURE, $adapter->processOutput($result[1]['stdout']));
 }
Пример #2
0
 public function testAdapterDetectsPassOverMultipleTestCaseRuns()
 {
     $runner = m::mock('\\Mutagenesis\\Runner\\Base');
     $runner->shouldReceive('getOptions')->andReturn(array('tests' => $this->root, 'clioptions' => array(), 'cache' => sys_get_temp_dir(), 'constraint' => ''));
     $runner->shouldReceive(array('getBootstrap' => null, 'getTimeout' => 1200));
     $adapter = new Phpunit();
     $result = $adapter->runTests($runner, true, true, array(), array(array('class' => 'PassTest', 'file' => 'PassTest.php'), array('class' => 'PassTest', 'file' => 'PassTest.php')));
     $this->assertTrue($adapter->processOutput($result[1]['stdout']));
 }