spec\LdapTools\Factory\LdapObjectSchemaFactorySpec::it_should_build_the_cache_item_if_it_cannot_be_found PHP Метод

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

public it_should_build_the_cache_item_if_it_cannot_be_found ( LdapTools\Cache\CacheInterface $cache, LdapTools\Schema\Parser\SchemaParserInterface $parser, $dispatcher )
$cache LdapTools\Cache\CacheInterface
$parser LdapTools\Schema\Parser\SchemaParserInterface
    function it_should_build_the_cache_item_if_it_cannot_be_found(CacheInterface $cache, SchemaParserInterface $parser, $dispatcher)
    {
        $cache->getUseAutoCache()->willReturn(false);
        $cache->contains(LdapObjectSchema::getCacheType(), 'ad.user')->willReturn(false);
        $parser->parse('ad', 'user')->willReturn(new LdapObjectSchema('ad', 'user'));
        $parser->parse('ad', 'user')->shouldBeCalled();
        $cache->set(Argument::any())->shouldBeCalled();
        $this->beConstructedWith($cache, $parser, $dispatcher);
        $this->get('ad', LdapObjectType::USER)->shouldReturnAnInstanceOf('\\LdapTools\\Schema\\LdapObjectSchema');
    }