spec\Prophecy\Doubler\DoublerSpec::its_getClassPatches_sorts_patches_by_priority PHP Метод

its_getClassPatches_sorts_patches_by_priority() публичный Метод

public its_getClassPatches_sorts_patches_by_priority ( Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt1, Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt2, Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt3, Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt4 )
$alt1 Prophecy\Doubler\ClassPatch\ClassPatchInterface
$alt2 Prophecy\Doubler\ClassPatch\ClassPatchInterface
$alt3 Prophecy\Doubler\ClassPatch\ClassPatchInterface
$alt4 Prophecy\Doubler\ClassPatch\ClassPatchInterface
    function its_getClassPatches_sorts_patches_by_priority(ClassPatchInterface $alt1, ClassPatchInterface $alt2, ClassPatchInterface $alt3, ClassPatchInterface $alt4)
    {
        $alt1->getPriority()->willReturn(2);
        $alt2->getPriority()->willReturn(50);
        $alt3->getPriority()->willReturn(10);
        $alt4->getPriority()->willReturn(0);
        $this->registerClassPatch($alt1);
        $this->registerClassPatch($alt2);
        $this->registerClassPatch($alt3);
        $this->registerClassPatch($alt4);
        $this->getClassPatches()->shouldReturn(array($alt2, $alt3, $alt1, $alt4));
    }