public function testGetters() { $args = new ArrayObject(); $failure = new RequestFailure($args, 'Expected Output', 'Actual Output'); $this->assertEquals('Expected Output', $failure->getExpectedOutput()); $this->assertEquals('Actual Output', $failure->getActualOutput()); $this->assertSame($args, $failure->getArgs()); }
/** * Print the actual and expected output. * * @param ResultsRenderer $renderer * @return string */ public function render(ResultsRenderer $renderer) { return sprintf(" %s\n%s\n\n %s\n%s\n", $renderer->style('YOUR OUTPUT:', ['bold', 'yellow']), $this->indent($renderer->style(sprintf('"%s"', $this->result->getActualOutput()), 'red')), $renderer->style('EXPECTED OUTPUT:', ['bold', 'yellow']), $this->indent($renderer->style(sprintf('"%s"', $this->result->getExpectedOutput()), 'green'))); }