コード例 #1
0
 /**
  * @test
  */
 public function it_gets_the_expected_values_from_the_getters()
 {
     $response = new Response($this->buildResponse());
     $this->assertEquals('Command', $response->getCommand());
     $this->assertEquals(0, $response->getExitCode());
     $this->assertEquals('Response', $response->getResponse());
     $this->assertEquals(true, $response->getSuccessful());
 }
コード例 #2
0
 /**
  * Display the response as a comment or error
  *
  * @param Response $response
  */
 protected function outputResponse(Response $response)
 {
     $type = $response->getSuccessful() ? 'comment' : 'error';
     $this->output->writeln("<" . $type . ">" . $response->getResponse() . "</" . $type . ">");
 }