function it_should_not_build_the_cache_when_auto_cache_is_enabled_and_the_cache_item_is_not_out_of_date(CacheInterface $cache, SchemaParserInterface $parser, $dispatcher)
{
$cache->getUseAutoCache()->willReturn(true);
$cache->contains(LdapObjectSchema::getCacheType(), 'ad.user')->willReturn(true);
$cache->getCacheCreationTime(LdapObjectSchema::getCacheType(), 'ad.user')->willReturn(new \DateTime('2015-1-3'));
$cache->set(Argument::any())->shouldNotBeCalled();
$cache->get(LdapObjectSchema::getCacheType(), 'ad.user')->willReturn(new LdapObjectSchema('ad', 'user'));
$parser->parse('ad', 'user')->shouldNotBeCalled();
$parser->getSchemaModificationTime('ad')->willReturn(new \DateTime('2015-1-2'));
$this->beConstructedWith($cache, $parser, $dispatcher);
$this->get('ad', LdapObjectType::USER)->shouldReturnAnInstanceOf('\\LdapTools\\Schema\\LdapObjectSchema');
}