Removed runtime check test for non-cacheable entities
This commit is contained in:
parent
acbda4bc0e
commit
012367a371
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user