1
0
mirror of synced 2025-03-21 23:43:53 +03:00

#1169 DDC-3343 - when a deletion fails for some reason, related cache entries should be evicted to avoid collisions with DB state

This commit is contained in:
Marco Pivetta 2015-01-27 09:03:36 +01:00
parent f32766c00d
commit c4019d96b9

View File

@ -296,10 +296,12 @@ class SecondLevelCacheTest extends SecondLevelCacheAbstractTest
$this->_em->clear();
$this->assertTrue($this->cache->containsEntity(Country::CLASSNAME, $countryId));
$this->assertFalse(
$this->cache->containsEntity(Country::CLASSNAME, $countryId),
'Removal attempts should clear the cache entry corresponding to the entity'
);
$country = $this->_em->find(Country::CLASSNAME, $countryId);
$this->assertInstanceOf(Country::CLASSNAME, $country);
$this->assertInstanceOf(Country::CLASSNAME, $this->_em->find(Country::CLASSNAME, $countryId));
}
public function testCachedNewEntityExists()