mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-17 17:47:13 +00:00
Revert "Merge pull request #10 from boenrobot/author"
This reverts commit21c36677ab, reversing changes made toffcaa03337.
This commit is contained in:
@@ -1,138 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* phpDocumentor Author tag test.
|
||||
*
|
||||
* PHP version 5.3
|
||||
*
|
||||
* @author Vasil Rangelov <[email protected]>
|
||||
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
|
||||
namespace phpDocumentor\Reflection\DocBlock\Tag;
|
||||
|
||||
/**
|
||||
* Test class for \phpDocumentor\Reflection\DocBlock\AuthorTag.
|
||||
*
|
||||
* @author Vasil Rangelov <[email protected]>
|
||||
* @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT
|
||||
* @link http://phpdoc.org
|
||||
*/
|
||||
class AuthorTagTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Test that the \phpDocumentor\Reflection\DocBlock\Tag\AuthorTag can
|
||||
* understand the @author DocBlock.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $content
|
||||
* @param string $extractedType
|
||||
* @param string $extractedVarName
|
||||
* @param string $extractedDescription
|
||||
*
|
||||
* @dataProvider provideDataForConstructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testConstructorParsesInputsIntoCorrectFields(
|
||||
$type,
|
||||
$content,
|
||||
$extractedName,
|
||||
$extractedURIs,
|
||||
$extractedRole,
|
||||
$extractedDescription
|
||||
) {
|
||||
$tag = new AuthorTag($type, $content);
|
||||
|
||||
$this->assertEquals($extractedName, $tag->getAuthorName());
|
||||
$this->assertEquals($extractedURIs, $tag->getAuthorURIs());
|
||||
$this->assertEquals($extractedRole, $tag->getAuthorRole());
|
||||
$this->assertEquals($extractedDescription, $tag->getDescription());
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for testConstructorParsesInputsIntoCorrectFields()
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provideDataForConstructor()
|
||||
{
|
||||
return array(
|
||||
array('author', 'Mike van Riel', 'Mike van Riel', array(), '', ''),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel <[email protected]>',
|
||||
'Mike van Riel',
|
||||
array('[email protected]'),
|
||||
'',
|
||||
''
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel <[email protected] >',
|
||||
'Mike van Riel',
|
||||
array('[email protected]'),
|
||||
'',
|
||||
''
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel < [email protected]>',
|
||||
'Mike van Riel',
|
||||
array('[email protected]'),
|
||||
'',
|
||||
''
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel < [email protected] >',
|
||||
'Mike van Riel',
|
||||
array('[email protected]'),
|
||||
'',
|
||||
''
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel <[email protected] @mvriel>',
|
||||
'Mike van Riel',
|
||||
array('[email protected]', '@mvriel'),
|
||||
'',
|
||||
''
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel <[email protected]> (lead)',
|
||||
'Mike van Riel',
|
||||
array('[email protected]'),
|
||||
'lead',
|
||||
''
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel <[email protected]> (lead) The one',
|
||||
'Mike van Riel',
|
||||
array('[email protected]'),
|
||||
'lead',
|
||||
'The one'
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel <[email protected]> The one',
|
||||
'Mike van Riel',
|
||||
array('[email protected]'),
|
||||
'',
|
||||
'The one'
|
||||
),
|
||||
array(
|
||||
'author',
|
||||
'Mike van Riel <> The one',
|
||||
'Mike van Riel',
|
||||
array(),
|
||||
'',
|
||||
'The one'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user