Index: Docblock/TagTest.php =================================================================== --- Docblock/TagTest.php (revision 17949) +++ Docblock/TagTest.php (working copy) @@ -54,5 +54,20 @@ $authorTag = $classReflection->getDocblock()->getTag('author'); $this->assertEquals($authorTag->getDescription(), 'Ralph Schindler '); } + + public function testAllowsJustTagNameInDocblockTagLine() + { + $classReflection = new Zend_Reflection_Class('Zend_Reflection_TestSampleClass6'); + + $tag = $classReflection->getMethod('doSomething')->getDocblock()->getTag('emptyTag'); + $this->assertEquals($tag->getName(), 'emptyTag', 'Factory First Match Failed'); + } -} + public function testAllowsMultipleWhitespacesBeforeDescription() + { + $classReflection = new Zend_Reflection_Class('Zend_Reflection_TestSampleClass6'); + + $tag = $classReflection->getMethod('doSomething')->getDocblock()->getTag('descriptionTag'); + $this->assertEquals($tag->getDescription(), 'A tag with just a description', 'Final Match Failed'); + } +} \ No newline at end of file Index: Docblock/Tag/ReturnTest.php =================================================================== --- Docblock/Tag/ReturnTest.php (revision 17949) +++ Docblock/Tag/ReturnTest.php (working copy) @@ -55,5 +55,14 @@ $this->assertEquals($paramTag->getType(), 'mixed'); } + public function testAllowsMultipleSpacesInDocblockTagLine() + { + $classReflection = new Zend_Reflection_Class('Zend_Reflection_TestSampleClass6'); + + $paramTag = $classReflection->getMethod('doSomething')->getDocblock()->getTag('return'); + + $this->assertEquals($paramTag->getType(), 'string', 'Second Match Failed'); + $this->assertEquals($paramTag->getDescription(),'Description of return value', 'Final Match Failed'); + } } Index: Docblock/Tag/ParamTest.php =================================================================== --- Docblock/Tag/ParamTest.php (revision 17949) +++ Docblock/Tag/ParamTest.php (working copy) @@ -64,5 +64,15 @@ $this->assertEquals($paramTag->getVariableName(), '$one'); } + public function testAllowsMultipleSpacesInDocblockTagLine() + { + $classReflection = new Zend_Reflection_Class('Zend_Reflection_TestSampleClass6'); + + $paramTag = $classReflection->getMethod('doSomething')->getDocblock()->getTag('param'); + + $this->assertEquals($paramTag->getType(), 'int', 'Second Match Failed'); + $this->assertEquals($paramTag->getVariableName(), '$var', 'Third Match Failed'); + $this->assertEquals($paramTag->getDescription(),'Description of $var', 'Final Match Failed'); + } } Index: _files/TestSampleClass.php =================================================================== --- _files/TestSampleClass.php (revision 17949) +++ _files/TestSampleClass.php (working copy) @@ -134,7 +134,36 @@ } +/** + * TestSampleClass6 Docblock Short Desc + * + * Testing for formatted dockblock tags. See ZF-6726. + * (This long description should be longer than 3 lines. + * It indeed is longer than 3 lines + * now.) + * + * @author Carlton Gibson + */ +class Zend_Reflection_TestSampleClass6 { + /** + * Method ShortDescription + * + * Notice the multiple spaces aligning the columns in the docblock + * tags. (This long description should be longer than 3 lines. + * It indeed is longer than 3 lines + * now.) + * + * @emptyTag + * @descriptionTag A tag with just a description + * @param int $var Description of $var + * @return string Description of return value + */ + public function doSomething($var) + { + return 'mixedValue'; + } +} /** * Enter description here...