/Tests/Unit/Reflection/DocCommentParserTest.php
PHP | 38 lines | 15 code | 5 blank | 18 comment | 0 complexity | fa32a8f8106d819c2d64039d85119f5b MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-3.0
- <?php
- namespace TYPO3\FLOW3\Tests\Unit\Reflection;
- /* *
- * This script belongs to the FLOW3 framework. *
- * *
- * It is free software; you can redistribute it and/or modify it under *
- * the terms of the GNU Lesser General Public License, either version 3 *
- * of the License, or (at your option) any later version. *
- * *
- * The TYPO3 project - inspiring people to share! *
- * */
- /**
- * Testcase for DocCommentParser
- */
- class DocCommentParserTest extends \TYPO3\FLOW3\Tests\UnitTestCase {
- /**
- * @test
- */
- public function descriptionWithOneLineIsParsedCorrectly() {
- $parser = new \TYPO3\FLOW3\Reflection\DocCommentParser();
- $parser->parseDocComment('/**' . chr(10) . ' * Testcase for DocCommentParser' . chr(10) . ' */');
- $this->assertEquals('Testcase for DocCommentParser', $parser->getDescription());
- }
- /**
- * @test
- */
- public function eolCharacterCanBeNewlineOrCarriageReturn() {
- $parser = new \TYPO3\FLOW3\Reflection\DocCommentParser();
- $parser->parseDocComment('/**' . chr(10) . ' * @var $foo integer' . chr(13) . chr(10) . ' * @var $bar string' . chr(10) . ' */');
- $this->assertEquals(array('$foo integer', '$bar string'), $parser->getTagValues('var'));
- }
- }
- ?>