Ejemplo n.º 1
0
 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);
 }