@@ 298-311 (lines=14) @@ | ||
295 | $this->factory->buildCachedCollectionPersister($em, $persister, $association); |
|
296 | } |
|
297 | ||
298 | public function testInvalidFileLockRegionDirectoryException() |
|
299 | { |
|
300 | $factory = new DefaultCacheFactory($this->regionsConfig, $this->getSharedSecondLevelCacheDriverImpl()); |
|
301 | ||
302 | $this->expectException(\LogicException::class); |
|
303 | $this->expectExceptionMessage( |
|
304 | 'If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" ' |
|
305 | . 'is required, The default implementation provided by doctrine is ' |
|
306 | . '"Doctrine\ORM\Cache\Region\FileLockRegion" if you want to use it please provide a valid directory' |
|
307 | ); |
|
308 | ||
309 | $fooCache = new CacheMetadata(CacheUsage::READ_WRITE, 'foo'); |
|
310 | $factory->getRegion($fooCache); |
|
311 | } |
|
312 | ||
313 | public function testInvalidFileLockRegionDirectoryExceptionWithEmptyString() |
|
314 | { |
|
@@ 313-328 (lines=16) @@ | ||
310 | $factory->getRegion($fooCache); |
|
311 | } |
|
312 | ||
313 | public function testInvalidFileLockRegionDirectoryExceptionWithEmptyString() |
|
314 | { |
|
315 | $factory = new DefaultCacheFactory($this->regionsConfig, $this->getSharedSecondLevelCacheDriverImpl()); |
|
316 | ||
317 | $factory->setFileLockRegionDirectory(''); |
|
318 | ||
319 | $this->expectException(\LogicException::class); |
|
320 | $this->expectExceptionMessage( |
|
321 | 'If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" ' |
|
322 | . 'is required, The default implementation provided by doctrine is ' |
|
323 | . '"Doctrine\ORM\Cache\Region\FileLockRegion" if you want to use it please provide a valid directory' |
|
324 | ); |
|
325 | ||
326 | $fooCache = new CacheMetadata(CacheUsage::READ_WRITE, 'foo'); |
|
327 | $factory->getRegion($fooCache); |
|
328 | } |
|
329 | ||
330 | public function testBuildsNewNamespacedCacheInstancePerRegionInstance() |
|
331 | { |