/vendor/doctrine-common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php
PHP | 26 lines | 21 code | 5 blank | 0 comment | 0 complexity | 96d1a77cf7d71e2198b9d03dba1ddc67 MD5 | raw file
Possible License(s): Apache-2.0, JSON, LGPL-2.1, LGPL-2.0, LGPL-3.0, BSD-3-Clause, BSD-2-Clause
- <?php
-
- namespace Doctrine\Tests\Common\Annotations;
-
- use Doctrine\Common\Annotations\AnnotationReader;
- use Doctrine\Common\Annotations\FileCacheReader;
-
- class FileCacheReaderTest extends AbstractReaderTest
- {
- private $cacheDir;
-
- protected function getReader()
- {
- $this->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);
- }
- }