<NME> AnnotationScannerTest.php
<BEF> <?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace ZendTest\Code\Scanner;

use PHPUnit\Framework\TestCase;
use Zend\Code\Annotation\AnnotationManager;
use Zend\Code\Annotation\Parser\GenericAnnotationParser;
use Zend\Code\NameInformation;

class AnnotationScannerTest extends \PHPUnit_Framework_TestCase
{
    public function testScannerWorks()
    {
        $annotationManager = new AnnotationManager();
        $parser = new GenericAnnotationParser();
     */
    public function testScannerWorks($newLine)
    {
        ));
        $annotationManager->attach($parser);

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

        $nameInfo = new NameInformation();
        $nameInfo->addUse('ZendTest\Code\Scanner\TestAsset\Annotation', 'Test');
            . ' * to be\')' . $newLine
            . ' * @Test\Bar' . $newLine . ' */';

        $this->assertEquals("'anything I want()\n to be'", $annotationScanner[0]->getContent());
        $this->assertEquals(get_class($bar), get_class($annotationScanner[1]));
    }
}
            ["\r"],
            ["\r\n"],
        ];
    }
}

<MSG> Merge branch 'master' of https://github.com/zendframework/zf2

<DFF> @@ -16,7 +16,10 @@ use Zend\Code\Annotation\Parser\GenericAnnotationParser;
 
 class AnnotationScannerTest extends \PHPUnit_Framework_TestCase
 {
-    public function testScannerWorks()
+    /**
+     * @dataProvider scannerWorksDataProvider
+     */
+    public function testScannerWorks($newLine)
     {
         $annotationManager = new AnnotationManager();
         $parser = new GenericAnnotationParser();
@@ -26,9 +29,10 @@ class AnnotationScannerTest extends \PHPUnit_Framework_TestCase
         ));
         $annotationManager->attach($parser);
 
-        $docComment = '/**' . "\n"
-            . ' * @Test\Foo(\'anything I want()' . "\n" . ' * to be\')' . "\n"
-            . ' * @Test\Bar' . "\n */";
+        $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');
@@ -38,4 +42,13 @@ class AnnotationScannerTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals("'anything I want()\n to be'", $annotationScanner[0]->getContent());
         $this->assertEquals(get_class($bar), get_class($annotationScanner[1]));
     }
+
+    public function scannerWorksDataProvider()
+    {
+        return array(
+            array("\n"),
+            array("\r"),
+            array("\r\n"),
+        );
+    }
 }

Merge branch 'master' of https://github.com/zendframework/zf2