Example #1
0
protected function createCoverallsV1JobsCommand()
{
$command = new CoverallsV1JobsCommand();
$command->setRootDir($this->rootDir);

return $command;
}
 /**
  * @test
  */
 public function shouldExecuteCoverallsV1JobsCommand()
 {
     $this->makeProjectDir(null, $this->logsDir);
     $this->dumpCloverXml();
     $command = new CoverallsV1JobsCommand();
     $command->setRootDir($this->rootDir);
     $app = new Application();
     $app->add($command);
     $command = $app->find('coveralls:v1:jobs');
     $commandTester = new CommandTester($command);
     $_SERVER['TRAVIS'] = true;
     $_SERVER['TRAVIS_JOB_ID'] = 'command_test';
     $actual = $commandTester->execute(array('command' => $command->getName(), '--dry-run' => true, '--config' => 'coveralls.yml', '--env' => 'test'));
     $this->assertEquals(0, $actual);
 }