class FileCacheReaderTest

Hierarchy

  • class \Doctrine\Tests\Common\Annotations\AbstractReaderTest extends \Doctrine\Tests\Common\Annotations\PHPUnit_Framework_TestCase

Expanded class hierarchy of FileCacheReaderTest

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/FileCacheReaderTest.php, line 8

Namespace

Doctrine\Tests\Common\Annotations
View source
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);
  }

  /**
   * @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));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractReaderTest::getReflectionClass public function
AbstractReaderTest::testAnnotations public function @dataProvider getReflectionClass
AbstractReaderTest::testAnnotationsWithValidTargets public function
AbstractReaderTest::testAnnotationsWithVarType public function
AbstractReaderTest::testClassSyntaxErrorContext public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in class Doctrine\Tests\Common\Annotations\DummyClassSyntaxError.
AbstractReaderTest::testClassWithAnnotationWithTargetSyntaxErrorAtClassDocBlock public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError.
AbstractReaderTest::testClassWithAnnotationWithTargetSyntaxErrorAtMethodDocBlock public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError.
AbstractReaderTest::testClassWithAnnotationWithTargetSyntaxErrorAtPropertyDocBlock public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 24 in class @Doctrine\Tests\Common\Annotations\Fixtures\AnnotationWithTargetSyntaxError.
AbstractReaderTest::testClassWithInvalidAnnotationTargetAtClassDocBlock public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetPropertyMethod is not allowed to be declared on class… 1
AbstractReaderTest::testClassWithInvalidAnnotationTargetAtMethodDocBlock public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on method… 1
AbstractReaderTest::testClassWithInvalidAnnotationTargetAtPropertyDocBlock public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetClass is not allowed to be declared on property… 1
AbstractReaderTest::testClassWithInvalidNestedAnnotationTargetAtPropertyDocBlock public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage [Semantical Error] Annotation @AnnotationTargetAnnotation is not allowed to be declared on property… 1
AbstractReaderTest::testClassWithMethodInvalidVarTypeError public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage [Type Error] Attribute "annotation" of @AnnotationWithVarType declared on method…
AbstractReaderTest::testClassWithPropertyInvalidVarTypeError public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage [Type Error] Attribute "string" of @AnnotationWithVarType declared on property…
AbstractReaderTest::testErrorWhenInvalidAnnotationIsUsed public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage The class "Doctrine\Tests\Common\Annotations\Fixtures\NoAnnotation" is not annotated with . Are you sure this class can be used as annotation? If…
AbstractReaderTest::testIgnoresAnnotationsNotPrefixedWithWhitespace public function
AbstractReaderTest::testImportDetectsNonExistentAnnotation public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage The annotation "@Foo\Bar\Name" in property Doctrine\Tests\Common\Annotations\TestNonExistentAnnotationClass::$field was never imported. 1
AbstractReaderTest::testImportDetectsNotImportedAnnotation public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage The annotation "@NameFoo" in property Doctrine\Tests\Common\Annotations\TestAnnotationNotImportedClass::$field was never imported. 1
AbstractReaderTest::testImportWithConcreteAnnotation public function
AbstractReaderTest::testImportWithInheritance public function
AbstractReaderTest::testInvalidAnnotationButIgnored public function @group DDC-1660 @group regression 1
AbstractReaderTest::testInvalidAnnotationUsageButIgnoredClass public function 1
AbstractReaderTest::testMethodSyntaxErrorContext public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in method Doctrine\Tests\Common\Annotations\DummyClassMethodSyntaxError::foo().
AbstractReaderTest::testMultipleAnnotationsOnSameLine public function @group regression
AbstractReaderTest::testNonAnnotationProblem public function
AbstractReaderTest::testPropertySyntaxErrorContext public function @expectedException Doctrine\Common\Annotations\AnnotationException @expectedExceptionMessage Expected namespace separator or identifier, got ')' at position 18 in property Doctrine\Tests\Common\Annotations\DummyClassPropertySyntaxError::$foo.
AbstractReaderTest::testTopLevelAnnotation public function
FileCacheReaderTest::$cacheDir private property
FileCacheReaderTest::getReader protected function Overrides AbstractReaderTest::getReader
FileCacheReaderTest::tearDown public function
FileCacheReaderTest::testAttemptToCreateAnnotationCacheDir public function @group DCOM-81