@@ 265-279 (lines=15) @@ | ||
262 | self::assertNotSame($cachedPersister1->getCacheRegion(), $cachedPersister2->getCacheRegion()); |
|
263 | } |
|
264 | ||
265 | public function testBuildCachedEntityPersisterNonStrictException() |
|
266 | { |
|
267 | $em = $this->em; |
|
268 | $metadata = clone $em->getClassMetadata(State::class); |
|
269 | $persister = new BasicEntityPersister($em, $metadata); |
|
270 | ||
271 | $metadata->setCache( |
|
272 | new CacheMetadata('-1', 'doctrine_tests_models_cache_state') |
|
273 | ); |
|
274 | ||
275 | $this->expectException(\InvalidArgumentException::class); |
|
276 | $this->expectExceptionMessage('Unrecognized access strategy type [-1]'); |
|
277 | ||
278 | $this->factory->buildCachedEntityPersister($em, $persister, $metadata); |
|
279 | } |
|
280 | ||
281 | public function testBuildCachedCollectionPersisterException() |
|
282 | { |
|
@@ 281-296 (lines=16) @@ | ||
278 | $this->factory->buildCachedEntityPersister($em, $persister, $metadata); |
|
279 | } |
|
280 | ||
281 | public function testBuildCachedCollectionPersisterException() |
|
282 | { |
|
283 | $em = $this->em; |
|
284 | $metadata = clone $em->getClassMetadata(State::class); |
|
285 | $association = $metadata->getProperty('cities'); |
|
286 | $persister = new OneToManyPersister($em); |
|
287 | ||
288 | $association->setCache( |
|
289 | new CacheMetadata('-1', 'doctrine_tests_models_cache_state__cities') |
|
290 | ); |
|
291 | ||
292 | $this->expectException(\InvalidArgumentException::class); |
|
293 | $this->expectExceptionMessage('Unrecognized access strategy type [-1]'); |
|
294 | ||
295 | $this->factory->buildCachedCollectionPersister($em, $persister, $association); |
|
296 | } |
|
297 | ||
298 | public function testInvalidFileLockRegionDirectoryException() |
|
299 | { |