Permalink
Browse files

Fixed testclass, removed references to the annotationreaderdecorator.

  • Loading branch information...
1 parent 6c00597 commit c5d44761597899c56659d6adcde6b61f83a0e568 @joshiausdemwald committed Jun 23, 2011
@@ -39,7 +39,11 @@ public function testDependencyResolving(array $files)
$container->setParameter('superparameter', 'superparametervalue');
- $reader = new \Ifschleife\Bundle\AutowiringBundle\Annotation\AnnotationReaderDecorator;
+ $docParser = new \Doctrine\Common\Annotations\DocParser();
+ $docParser->setAutoloadAnnotations(true);
+ $docParser->setIgnoreNotImportedAnnotations(true);
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader($docParser);
$serviceBuilder = new \Ifschleife\Bundle\AutowiringBundle\Autowiring\ServiceBuilder(
new \Ifschleife\Bundle\AutowiringBundle\DependencyInjection\Loader\AnnotatedFileLoader(
@@ -240,7 +244,11 @@ public function failOptionalArguments()
{
$container = new \Symfony\Component\DependencyInjection\ContainerBuilder();
- $reader = new \Ifschleife\Bundle\AutowiringBundle\Annotation\AnnotationReaderDecorator;
+ $docParser = new \Doctrine\Common\Annotations\DocParser;
+ $docParser->setAutoloadAnnotations(true);
+ $docParser->setIgnoreNotImportedAnnotations(true);
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader($docParser);
$serviceBuilder = new \Ifschleife\Bundle\AutowiringBundle\Autowiring\ServiceBuilder(
new \Ifschleife\Bundle\AutowiringBundle\DependencyInjection\Loader\AnnotatedFileLoader(
@@ -295,7 +303,11 @@ public function testOptionalArguments($file)
{
$container = new \Symfony\Component\DependencyInjection\ContainerBuilder();
- $reader = new \Ifschleife\Bundle\AutowiringBundle\Annotation\AnnotationReaderDecorator;
+ $docParser = new \Doctrine\Common\Annotations\DocParser();
+ $docParser->setAutoloadAnnotations(true);
+ $docParser->setIgnoreNotImportedAnnotations(true);
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader($docParser);
$serviceBuilder = new \Ifschleife\Bundle\AutowiringBundle\Autowiring\ServiceBuilder(
new \Ifschleife\Bundle\AutowiringBundle\DependencyInjection\Loader\AnnotatedFileLoader(
@@ -38,7 +38,11 @@ function testConstruct()
{
$container = new ContainerBuilder;
- $reader = new \Ifschleife\Bundle\AutowiringBundle\Annotation\AnnotationReaderDecorator;
+ $docParser = new \Doctrine\Common\Annotations\DocParser();
+ $docParser->setAutoloadAnnotations(true);
+ $docParser->setIgnoreNotImportedAnnotations(true);
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader($docParser);
$loader = new AnnotatedFileLoader(
$container,
@@ -74,7 +78,11 @@ function testBuilder(array $files)
{
$container = new ContainerBuilder;
- $reader = new \Ifschleife\Bundle\AutowiringBundle\Annotation\AnnotationReaderDecorator;
+ $docParser = new \Doctrine\Common\Annotations\DocParser();
+ $docParser->setAutoloadAnnotations(true);
+ $docParser->setIgnoreNotImportedAnnotations(true);
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader($docParser);
$loader = new AnnotatedFileLoader(
$container,
@@ -26,9 +26,10 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
-use Ifschleife\Bundle\AutowiringBundle\Annotation\AnnotationReaderDecorator;
+use Doctrine\Common\Annotations\AnnotationReader;
use Ifschleife\Bundle\AutowiringBundle\DependencyInjection\Loader\AnnotatedFileLoader;
use Ifschleife\Bundle\AutowiringBundle\Autowiring\Parser\PhpParser;
+use Doctrine\Common\Annotations\DocParser;
/**
* AnnotatedFileLoaderTest
@@ -46,7 +47,11 @@ function testFiles($file)
$parser = new PhpParser();
- $reader = new AnnotationReaderDecorator();
+ $docParser = new DocParser();
+ $docParser->setAutoloadAnnotations(true);
+ $docParser->setIgnoreNotImportedAnnotations(true);
+
+ $reader = new AnnotationReader($docParser);
$locator = new FileLocator();
@@ -66,7 +71,11 @@ function testMalformedFiles($file)
$parser = new PhpParser();
- $reader = new AnnotationReaderDecorator();
+ $docParser = new DocParser();
+ $docParser->setAutoloadAnnotations(true);
+ $docParser->setIgnoreNotImportedAnnotations(true);
+
+ $reader = new AnnotationReader($docParser);
$locator = new FileLocator();
@@ -89,7 +98,11 @@ function testOptionalArguments($file)
$parser = new PhpParser();
- $reader = new AnnotationReaderDecorator();
+ $docParser = new DocParser();
+ $docParser->setIgnoreNotImportedAnnotations(true);
+ $docParser->setAutoloadAnnotations(true);
+
+ $reader = new AnnotationReader($docParser);
$locator = new FileLocator();

0 comments on commit c5d4476

Please sign in to comment.