public function testLoadMetadataForClass() { $className = 'Doctrine\\Tests\\Models\\Comments\\User'; $metadata = new ClassMetadata($className); $this->annotationDriver->loadMetadataForClass($className, $metadata); $expected = $this->loadExpectedMetadataFor($className, 'users'); $this->assertEquals($expected, $metadata); }
<?php if (!file_exists($file = __DIR__ . '/../vendor/autoload.php')) { throw new RuntimeException('Install dependencies to run test suite.'); } $loader = (require $file); \Doctrine\Search\Mapping\Driver\AnnotationDriver::registerAnnotationClasses();
/** * @expectedException \PHPUnit_Framework_Error */ public function testLoadMetadataForClassWrongParameterClassMetadata() { $this->annotationDriver->loadMetadataForClass('test', new \StdClass()); }