X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=vendor%2Fdoctrine%2Fcommon%2Ftests%2FDoctrine%2FTests%2FCommon%2FAnnotations%2FFileCacheReaderTest.php;fp=vendor%2Fdoctrine%2Fcommon%2Ftests%2FDoctrine%2FTests%2FCommon%2FAnnotations%2FFileCacheReaderTest.php;h=c84344d81e4caae8b9bdb00ab8ac3d7cd404ab19;hb=8b04b2d11798dee4f3e1358e4f43e97a6df851f6;hp=0000000000000000000000000000000000000000;hpb=73568cf05a785a45f94ca3f2351d9e07bf917958;p=zf2.biz%2Fapplication_blanche.git diff --git a/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php b/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php new file mode 100644 index 0000000..c84344d --- /dev/null +++ b/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php @@ -0,0 +1,40 @@ +cacheDir = sys_get_temp_dir() . "/annotations_". uniqid(); + @mkdir($this->cacheDir); + return new FileCacheReader(new AnnotationReader(), $this->cacheDir); + } + + public function tearDown() + { + foreach (glob($this->cacheDir.'/*.php') AS $file) { + unlink($file); + } + rmdir($this->cacheDir); + } + + /** + * @group DCOM-81 + */ + public function testAttemptToCreateAnnotationCacheDir() + { + $this->cacheDir = sys_get_temp_dir() . "/not_existed_dir_". uniqid(); + + $this->assertFalse(is_dir($this->cacheDir)); + + $cache = new FileCacheReader(new AnnotationReader(), $this->cacheDir); + + $this->assertTrue(is_dir($this->cacheDir)); + } +} \ No newline at end of file