/** * @test * @covers Plum\Plum\Result::addException() * @covers Plum\Plum\Result::getExceptions() * @covers Plum\Plum\Result::getErrorCount() */ public function addExceptionShouldAddException() { $exception = new Exception(); $this->assertInstanceOf('Plum\\Plum\\Result', $this->result->addException($exception)); $this->assertContains($exception, $this->result->getExceptions()); $this->assertEquals(1, $this->result->getErrorCount()); }
/** * @param Result $result */ public function outputExceptions(Result $result) { foreach ($result->getExceptions() as $exception) { $this->outputExceptionMessage($exception)->outputExceptionTrace($exception); } return $this; }