Esempio n. 1
0
 public function testParseAnnotationDocblocks()
 {
     $class = new \ReflectionClass(__NAMESPACE__ . '\\DCOM55Annotation');
     $reader = new \Doctrine\Common\Annotations\AnnotationReader();
     $annots = $reader->getClassAnnotations($class);
     $this->assertEquals(0, count($annots));
 }
Esempio n. 2
0
 public function testIssue()
 {
     $reader = new \Doctrine\Common\Annotations\AnnotationReader();
     $result = $reader->getClassAnnotations(new \ReflectionClass(__NAMESPACE__ . "\\MappedClass"));
     foreach ($result as $annot) {
         $classAnnotations[get_class($annot)] = $annot;
     }
     $this->assertTrue(!isset($classAnnotations['']), 'Class "xxx" is not a valid entity or mapped super class.');
 }
Esempio n. 3
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage Class "xxx" is not a valid entity or mapped super class.
  */
 public function testIssue()
 {
     $reader = new \Doctrine\Common\Annotations\AnnotationReader();
     $result = $reader->getClassAnnotations(new \ReflectionClass(__NAMESPACE__ . "\\MappedClass"));
     foreach ($result as $annot) {
         $classAnnotations[get_class($annot)] = $annot;
     }
     // Evaluate Entity annotation
     if (!isset($classAnnotations['Doctrine\\Tests\\Common\\Annotations\\Ticket\\Doctrine\\ORM\\Mapping\\Entity'])) {
         throw new \Exception('Class "xxx" is not a valid entity or mapped super class.');
     }
 }