Inheritance: extends AdapterAbstract
Ejemplo n.º 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']));
 }
Ejemplo n.º 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']));
 }