|
@@ -14,7 +14,7 @@ namespace Symfony\Tests\Component\Validator\Mapping\Loader;
|
|
|
require_once __DIR__.'/../../Fixtures/Entity.php';
|
|
|
require_once __DIR__.'/../../Fixtures/ConstraintA.php';
|
|
|
|
|
|
-use Doctrine\Common\Annotations\Reader;
|
|
|
+use Doctrine\Common\Annotations\AnnotationReader;
|
|
|
use Symfony\Component\Validator\Constraints\All;
|
|
|
use Symfony\Component\Validator\Constraints\Collection;
|
|
|
use Symfony\Component\Validator\Constraints\NotNull;
|
|
@@ -28,14 +28,14 @@ class AnnotationLoaderTest extends \PHPUnit_Framework_TestCase
|
|
|
{
|
|
|
protected function setUp()
|
|
|
{
|
|
|
- if (!class_exists('Doctrine\Common\Annotations\Reader')) {
|
|
|
+ if (!class_exists('Doctrine\Common\Annotations\AnnotationReader')) {
|
|
|
$this->markTestSkipped('Unmet dependency: Annotations is required for this test');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public function testLoadClassMetadataReturnsTrueIfSuccessful()
|
|
|
{
|
|
|
- $loader = new AnnotationLoader(new Reader());
|
|
|
+ $loader = new AnnotationLoader(new AnnotationReader());
|
|
|
$metadata = new ClassMetadata('Symfony\Tests\Component\Validator\Fixtures\Entity');
|
|
|
|
|
|
$this->assertTrue($loader->loadClassMetadata($metadata));
|
|
@@ -43,7 +43,7 @@ class AnnotationLoaderTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
|
public function testLoadClassMetadataReturnsFalseIfNotSuccessful()
|
|
|
{
|
|
|
- $loader = new AnnotationLoader(new Reader());
|
|
|
+ $loader = new AnnotationLoader(new AnnotationReader());
|
|
|
$metadata = new ClassMetadata('\stdClass');
|
|
|
|
|
|
$this->assertFalse($loader->loadClassMetadata($metadata));
|
|
@@ -51,7 +51,7 @@ class AnnotationLoaderTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
|
public function testLoadClassMetadata()
|
|
|
{
|
|
|
- $loader = new AnnotationLoader($reader = new Reader());
|
|
|
+ $loader = new AnnotationLoader(new AnnotationReader());
|
|
|
$metadata = new ClassMetadata('Symfony\Tests\Component\Validator\Fixtures\Entity');
|
|
|
|
|
|
$loader->loadClassMetadata($metadata);
|
|
@@ -84,7 +84,7 @@ class AnnotationLoaderTest extends \PHPUnit_Framework_TestCase
|
|
|
*/
|
|
|
public function testLoadParentClassMetadata()
|
|
|
{
|
|
|
- $loader = new AnnotationLoader(new Reader());
|
|
|
+ $loader = new AnnotationLoader(new AnnotationReader());
|
|
|
|
|
|
// Load Parent MetaData
|
|
|
$parent_metadata = new ClassMetadata('Symfony\Tests\Component\Validator\Fixtures\EntityParent');
|
|
@@ -101,7 +101,7 @@ class AnnotationLoaderTest extends \PHPUnit_Framework_TestCase
|
|
|
*/
|
|
|
public function testLoadClassMetadataAndMerge()
|
|
|
{
|
|
|
- $loader = new AnnotationLoader($reader = new Reader());
|
|
|
+ $loader = new AnnotationLoader(new AnnotationReader());
|
|
|
|
|
|
// Load Parent MetaData
|
|
|
$parent_metadata = new ClassMetadata('Symfony\Tests\Component\Validator\Fixtures\EntityParent');
|