From 012367a371e2c0ed2b41589ce72b933c460147fd Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Sat, 20 Jun 2015 13:42:33 +0200 Subject: [PATCH] Removed runtime check test for non-cacheable entities --- .../Tests/ORM/Cache/DefaultQueryCacheTest.php | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php b/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php index 3af1a3bc4..0c537b2c5 100644 --- a/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Cache/DefaultQueryCacheTest.php @@ -437,30 +437,6 @@ class DefaultQueryCacheTest extends OrmTestCase $this->assertNull($this->queryCache->get($key, $rsm)); } - /** - * @expectedException Doctrine\ORM\Cache\CacheException - * @expectedExceptionMessage Entity association field "Doctrine\Tests\Models\Cache\City#travels" not configured as part of the second-level cache. - */ - public function testQueryNotCacheableAssociationException() - { - $uow = $this->em->getUnitOfWork(); - $key = new QueryCacheKey('query.key1', 0); - $rsm = new ResultSetMappingBuilder($this->em); - $cityClass = $this->em->getClassMetadata(City::CLASSNAME); - $city = new City("City 1", null); - $result = array( - $city - ); - - $cityClass->setFieldValue($city, 'id', 1); - - $rsm->addRootEntityFromClassMetadata(City::CLASSNAME, 'c'); - $rsm->addJoinedEntityFromClassMetadata(Travel::CLASSNAME, 't', 'c', 'travels', array('id' => 't_id')); - $uow->registerManaged($city, array('id' => $city->getId()), array('name' => $city->getName(), 'state' => null)); - - $this->queryCache->put($key, $rsm, $result); - } - /** * @expectedException Doctrine\ORM\Cache\CacheException * @expectedExceptionMessage Second level cache does not support scalar results.