spec\PhpSpec\Formatter\Presenter\Differ\ObjectEngineSpec::it_converts_objects_to_string_and_diffs_the_result PHP Method

it_converts_objects_to_string_and_diffs_the_result() public method

public it_converts_objects_to_string_and_diffs_the_result ( SebastianBergmann\Exporter\Exporter $exporter, StringEngine $stringDiffer )
$exporter SebastianBergmann\Exporter\Exporter
$stringDiffer PhpSpec\Formatter\Presenter\Differ\StringEngine
    function it_converts_objects_to_string_and_diffs_the_result(Exporter $exporter, StringEngine $stringDiffer)
    {
        $exporter->export(Argument::type('DateTime'))->willReturn('DateTime');
        $exporter->export(Argument::type('ArrayObject'))->willReturn('ArrayObject');
        $stringDiffer->compare('DateTime', 'ArrayObject')->willReturn('-DateTime+ArrayObject');
        $diff = $this->compare(new \DateTime(), new \ArrayObject());
        $diff->shouldBe('-DateTime+ArrayObject');
    }