FileCacheReaderTest.php 645B

1234567891011121314151617181920212223242526
  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. }