class ParamTagTest in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php \phpDocumentor\Reflection\DocBlock\Tag\ParamTagTest
Test class for \phpDocumentor\Reflection\DocBlock\ParamTag
@author Mike van Riel <mike.vanriel@naenius.com> @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
Hierarchy
- class \phpDocumentor\Reflection\DocBlock\Tag\ParamTagTest extends \phpDocumentor\Reflection\DocBlock\Tag\PHPUnit_Framework_TestCase
Expanded class hierarchy of ParamTagTest
File
- vendor/
phpdocumentor/ reflection-docblock/ tests/ phpDocumentor/ Reflection/ DocBlock/ Tag/ ParamTagTest.php, line 23
Namespace
phpDocumentor\Reflection\DocBlock\TagView source
class ParamTagTest extends \PHPUnit_Framework_TestCase {
/**
* Test that the \phpDocumentor\Reflection\DocBlock\Tag\ParamTag can
* understand the @param DocBlock.
*
* @param string $type
* @param string $content
* @param string $extractedType
* @param string $extractedTypes
* @param string $extractedVarName
* @param string $extractedDescription
*
* @covers \phpDocumentor\Reflection\DocBlock\Tag\ParamTag
* @dataProvider provideDataForConstructor
*
* @return void
*/
public function testConstructorParsesInputsIntoCorrectFields($type, $content, $extractedType, $extractedTypes, $extractedVarName, $extractedDescription) {
$tag = new ParamTag($type, $content);
$this
->assertEquals($type, $tag
->getName());
$this
->assertEquals($extractedType, $tag
->getType());
$this
->assertEquals($extractedTypes, $tag
->getTypes());
$this
->assertEquals($extractedVarName, $tag
->getVariableName());
$this
->assertEquals($extractedDescription, $tag
->getDescription());
}
/**
* Data provider for testConstructorParsesInputsIntoCorrectFields()
*
* @return array
*/
public function provideDataForConstructor() {
return array(
array(
'param',
'int',
'int',
array(
'int',
),
'',
'',
),
array(
'param',
'$bob',
'',
array(),
'$bob',
'',
),
array(
'param',
'int Number of bobs',
'int',
array(
'int',
),
'',
'Number of bobs',
),
array(
'param',
'int $bob',
'int',
array(
'int',
),
'$bob',
'',
),
array(
'param',
'int $bob Number of bobs',
'int',
array(
'int',
),
'$bob',
'Number of bobs',
),
array(
'param',
"int Description \n on multiple lines",
'int',
array(
'int',
),
'',
"Description \n on multiple lines",
),
array(
'param',
"int \n\$bob Variable name on a new line",
'int',
array(
'int',
),
'$bob',
"Variable name on a new line",
),
array(
'param',
"\nint \$bob Type on a new line",
'int',
array(
'int',
),
'$bob',
"Type on a new line",
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParamTagTest:: |
public | function | Data provider for testConstructorParsesInputsIntoCorrectFields() | |
ParamTagTest:: |
public | function | Test that the \phpDocumentor\Reflection\DocBlock\Tag\ParamTag can understand the |