diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultCacheInstantiatorTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheInstantiatorTest.php new file mode 100644 index 000000000..49c8573bc --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultCacheInstantiatorTest.php @@ -0,0 +1,29 @@ +getMock('Doctrine\ORM\EntityManagerInterface'); + $config = $this->getMock('Doctrine\ORM\Configuration'); + $cacheConfig = $this->getMock('Doctrine\ORM\Cache\CacheConfiguration'); + + $entityManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($config)); + $config + ->expects($this->any()) + ->method('getSecondLevelCacheConfiguration') + ->will($this->returnValue($cacheConfig)); + + $instantiator = new DefaultCacheInstantiator(); + + $this->assertInstanceOf('Doctrine\ORM\Cache\DefaultCache', $instantiator->getCache($entityManager)); + } +}