spec\PhpSpec\Formatter\Presenter\Differ\DifferSpec::it_chooses_proper_engine_based_on_values PHP Method

it_chooses_proper_engine_based_on_values() public method

public it_chooses_proper_engine_based_on_values ( PhpSpec\Formatter\Presenter\Differ\DifferEngine $engine1, PhpSpec\Formatter\Presenter\Differ\DifferEngine $engine2 )
$engine1 PhpSpec\Formatter\Presenter\Differ\DifferEngine
$engine2 PhpSpec\Formatter\Presenter\Differ\DifferEngine
    function it_chooses_proper_engine_based_on_values(DifferEngine $engine1, DifferEngine $engine2)
    {
        $engine1->supports('string1', 'string2')->willReturn(true);
        $engine2->supports('string1', 'string2')->willReturn(false);
        $engine1->compare('string1', 'string2')->willReturn('string1 !== string2');
        $engine1->supports(2, 1)->willReturn(false);
        $engine2->supports(2, 1)->willReturn(true);
        $engine2->compare(2, 1)->willReturn('2 !== 1');
        $this->addEngine($engine1);
        $this->addEngine($engine2);
        $this->compare('string1', 'string2')->shouldReturn('string1 !== string2');
        $this->compare(2, 1)->shouldReturn('2 !== 1');
    }