PageRenderTime 49ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/doctrine-common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php

https://bitbucket.org/Leimz/leimzwebsite
PHP | 26 lines | 21 code | 5 blank | 0 comment | 0 complexity | ceb781c03780a086a22e0e6191cb673d MD5 | raw file
Possible License(s): Apache-2.0, LGPL-2.1, LGPL-3.0, BSD-2-Clause, BSD-3-Clause
  1. <?php
  2. namespace Doctrine\Tests\Common\Annotations;
  3. use Doctrine\Common\Annotations\AnnotationReader;
  4. use Doctrine\Common\Annotations\FileCacheReader;
  5. class FileCacheReaderTest extends AbstractReaderTest
  6. {
  7. private $cacheDir;
  8. protected function getReader()
  9. {
  10. $this->cacheDir = sys_get_temp_dir() . "/annotations_". uniqid();
  11. @mkdir($this->cacheDir);
  12. return new FileCacheReader(new AnnotationReader(), $this->cacheDir);
  13. }
  14. public function tearDown()
  15. {
  16. foreach (glob($this->cacheDir.'/*.php') AS $file) {
  17. unlink($file);
  18. }
  19. rmdir($this->cacheDir);
  20. }
  21. }