コード例 #1
0
ファイル: ResultTest.php プロジェクト: sliver/Robo
 public function testBasics()
 {
     $task = new ResultDummyTask();
     $result = new Result($task, 1, 'The foo barred', ['time' => 0]);
     $this->guy->seeInOutput('The foo barred');
     $this->guy->seeInOutput('Error');
     $this->guy->seeInOutput('[ResultDummyTask]');
     $this->assertSame($task, $result->getTask());
     $this->assertEquals(1, $result->getExitCode());
     $this->assertEquals('The foo barred', $result->getMessage());
     $this->assertEquals(['time' => 0], $result->getData());
     $taskClone = $result->cloneTask();
     $this->assertNotSame($task, $taskClone);
     $this->assertInstanceOf('Robo\\Task\\Shared\\TaskInterface', $taskClone);
 }
コード例 #2
0
ファイル: ResultPrinter.php プロジェクト: jjok/Robo
 /**
  * Log that we are about to abort due to an error being encountered
  * in 'stop on fail' mode.
  *
  * @param \Robo\Result $result
  */
 public function printStopOnFail($result)
 {
     $this->printMessage(LogLevel::NOTICE, 'Stopping on fail. Exiting....');
     $this->printMessage(LogLevel::ERROR, 'Exit Code: {code}', ['code' => $result->getExitCode()]);
 }