spec\PhpSpec\Locator\PrioritizedResourceManagerSpec::it_creates_resource_from_classname_using_locator_with_highest_priority PHP Method

it_creates_resource_from_classname_using_locator_with_highest_priority() public method

public it_creates_resource_from_classname_using_locator_with_highest_priority ( $locator1, $locator2, PhpSpec\Locator\Resource $resource1, PhpSpec\Locator\Resource $resource2 )
$resource1 PhpSpec\Locator\Resource
$resource2 PhpSpec\Locator\Resource
    function it_creates_resource_from_classname_using_locator_with_highest_priority($locator1, $locator2, Resource $resource1, Resource $resource2)
    {
        $this->registerLocator($locator1);
        $this->registerLocator($locator2);
        $locator1->supportsClass('Some\\Class')->willReturn(true);
        $locator1->createResource('Some\\Class')->willReturn($resource1);
        $locator2->supportsClass('Some\\Class')->willReturn(true);
        $locator2->createResource('Some\\Class')->willReturn($resource2);
        $this->createResource('Some\\Class')->shouldReturn($resource2);
    }