1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Removed runtime check test for non-cacheable entities

This commit is contained in:
Asmir Mustafic 2015-06-20 13:42:33 +02:00
parent acbda4bc0e
commit 012367a371

View File

@ -437,30 +437,6 @@ class DefaultQueryCacheTest extends OrmTestCase
$this->assertNull($this->queryCache->get($key, $rsm)); $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 * @expectedException Doctrine\ORM\Cache\CacheException
* @expectedExceptionMessage Second level cache does not support scalar results. * @expectedExceptionMessage Second level cache does not support scalar results.