spec\PhpSpec\Locator\PrioritizedResourceManagerSpec::it_locates_resources_using_all_registered_locators PHP Метод

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

public it_locates_resources_using_all_registered_locators ( $locator1, $locator2, PhpSpec\Locator\Resource $resource1, PhpSpec\Locator\Resource $resource2, PhpSpec\Locator\Resource $resource3 )
$resource1 PhpSpec\Locator\Resource
$resource2 PhpSpec\Locator\Resource
$resource3 PhpSpec\Locator\Resource
    function it_locates_resources_using_all_registered_locators($locator1, $locator2, Resource $resource1, Resource $resource2, Resource $resource3)
    {
        $this->registerLocator($locator1);
        $this->registerLocator($locator2);
        $locator1->supportsQuery('s:query')->willReturn(true);
        $locator1->findResources('s:query')->willReturn(array($resource3, $resource2));
        $locator2->supportsQuery('s:query')->willReturn(true);
        $locator2->findResources('s:query')->willReturn(array($resource1));
        $resource1->getSpecClassname()->willReturn('Some\\Spec1');
        $resource2->getSpecClassname()->willReturn('Some\\Spec2');
        $resource3->getSpecClassname()->willReturn('Some\\Spec3');
        $this->locateResources('s:query')->shouldReturn(array($resource1, $resource3, $resource2));
    }