1
0
mirror of synced 2025-01-31 20:41:44 +03:00

Added test case for buildCachedCollectioHydrator on DefaultCacheFactory

This commit is contained in:
Asmir Mustafic 2015-01-17 00:15:27 +01:00 committed by Marco Pivetta
parent b0792330e4
commit 77c2e24215

View File

@ -281,4 +281,18 @@ class DefaultCacheFactoryTest extends OrmTestCase
$this->assertSame('foo', $fooRegion->getCache()->getNamespace());
$this->assertSame('bar', $barRegion->getCache()->getNamespace());
}
public function testBuildCachedCollectioHydrator()
{
$em = $this->em;
$entityName = 'Doctrine\Tests\Models\Cache\State';
$metadata = $em->getClassMetadata($entityName);
$mapping = $metadata->associationMappings['cities'];
$mapping['cache']['usage'] = ClassMetadata::CACHE_USAGE_READ_ONLY;
$hydrator = $this->factory->buildCollectionHydrator($em, $mapping);
$this->assertInstanceOf('Doctrine\ORM\Cache\MultiGetCollectionHydrator', $hydrator);
}
}