|
@@ 266-276 (lines=11) @@
|
| 263 |
|
* @expectedException LogicException |
| 264 |
|
* @expectedExceptionMessage If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" is required, The default implementation provided by doctrine is "Doctrine\ORM\Cache\Region\FileLockRegion" if you want to use it please provide a valid directory |
| 265 |
|
*/ |
| 266 |
|
public function testInvalidFileLockRegionDirectoryException() |
| 267 |
|
{ |
| 268 |
|
$factory = new DefaultCacheFactory($this->regionsConfig, $this->getSharedSecondLevelCacheDriverImpl()); |
| 269 |
|
|
| 270 |
|
$factory->getRegion( |
| 271 |
|
[ |
| 272 |
|
'usage' => ClassMetadata::CACHE_USAGE_READ_WRITE, |
| 273 |
|
'region' => 'foo' |
| 274 |
|
] |
| 275 |
|
); |
| 276 |
|
} |
| 277 |
|
|
| 278 |
|
/** |
| 279 |
|
* @expectedException LogicException |
|
@@ 282-294 (lines=13) @@
|
| 279 |
|
* @expectedException LogicException |
| 280 |
|
* @expectedExceptionMessage If you want to use a "READ_WRITE" cache an implementation of "Doctrine\ORM\Cache\ConcurrentRegion" is required, The default implementation provided by doctrine is "Doctrine\ORM\Cache\Region\FileLockRegion" if you want to use it please provide a valid directory |
| 281 |
|
*/ |
| 282 |
|
public function testInvalidFileLockRegionDirectoryExceptionWithEmptyString() |
| 283 |
|
{ |
| 284 |
|
$factory = new DefaultCacheFactory($this->regionsConfig, $this->getSharedSecondLevelCacheDriverImpl()); |
| 285 |
|
|
| 286 |
|
$factory->setFileLockRegionDirectory(''); |
| 287 |
|
|
| 288 |
|
$factory->getRegion( |
| 289 |
|
[ |
| 290 |
|
'usage' => ClassMetadata::CACHE_USAGE_READ_WRITE, |
| 291 |
|
'region' => 'foo' |
| 292 |
|
] |
| 293 |
|
); |
| 294 |
|
} |
| 295 |
|
|
| 296 |
|
public function testBuildsNewNamespacedCacheInstancePerRegionInstance() |
| 297 |
|
{ |