Skip to content

Commit

Permalink
Fixed testclass, removed references to the annotationreaderdecorator.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiausdemwald committed Jun 23, 2011
1 parent 6c00597 commit c5d4476
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Expand Up @@ -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
Expand All @@ -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();

Expand All @@ -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();

Expand All @@ -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();

Expand Down

0 comments on commit c5d4476

Please sign in to comment.