<NME> AnnotationScannerTest.php
<BEF> <?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
use Zend\Code\Scanner\AnnotationScanner;
use Zend\Code\NameInformation;
use Zend\Code\Annotation\AnnotationManager;

class AnnotationScannerTest extends \PHPUnit_Framework_TestCase
{

    public function testScannerWorks()
    {
        $annotationManager = new AnnotationManager(array(
            $foo = new TestAsset\Annotation\Foo(),
            $bar = new TestAsset\Annotation\Bar()
        ));

        $docComment = '/**' . "\n"
            . ' * @Test\Foo(\'anything I want()' . "\n" . ' * to be\')' . "\n"
     * @param string $newLine
     */
    public function testScannerWorks($newLine)
    {
        $annotationManager = new AnnotationManager();
        $parser = new GenericAnnotationParser();
        $parser->registerAnnotations([
            $foo = new TestAsset\Annotation\Foo(),
            $bar = new TestAsset\Annotation\Bar(),
        ]);
        $annotationManager->attach($parser);

        $docComment = '/**' . $newLine
            . ' * @Test\Foo(\'anything I want()' . $newLine
            . ' * to be\')' . $newLine
            . ' * @Test\Bar' . $newLine . ' */';

        $nameInfo = new NameInformation();
        $nameInfo->addUse('ZendTest\Code\Scanner\TestAsset\Annotation', 'Test');

        $annotationScanner = new AnnotationScanner($annotationManager, $docComment, $nameInfo);
        self::assertEquals(get_class($foo), get_class($annotationScanner[0]));
        self::assertEquals("'anything I want()\n to be'", $annotationScanner[0]->getContent());
        self::assertEquals(get_class($bar), get_class($annotationScanner[1]));
    }

    public function newLine()
    {
        return [
            ["\n"],
            ["\r"],
            ["\r\n"],
        ];
    }
}

<MSG> Merge remote-tracking branch 'weierophinney/feature/doctrine-annotations'

<DFF> @@ -5,16 +5,20 @@ namespace ZendTest\Code\Scanner;
 use Zend\Code\Scanner\AnnotationScanner;
 use Zend\Code\NameInformation;
 use Zend\Code\Annotation\AnnotationManager;
+use Zend\Code\Annotation\Parser\GenericAnnotationParser;
 
 class AnnotationScannerTest extends \PHPUnit_Framework_TestCase
 {
 
     public function testScannerWorks()
     {
-        $annotationManager = new AnnotationManager(array(
+        $annotationManager = new AnnotationManager();
+        $parser = new GenericAnnotationParser();
+        $parser->registerAnnotations(array(
             $foo = new TestAsset\Annotation\Foo(),
             $bar = new TestAsset\Annotation\Bar()
         ));
+        $annotationManager->attach($parser);
 
         $docComment = '/**' . "\n"
             . ' * @Test\Foo(\'anything I want()' . "\n" . ' * to be\')' . "\n"

Merge remote-tracking branch 'weierophinney/feature/doctrine-annotations'