class VarTagTest in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php \phpDocumentor\Reflection\DocBlock\Tag\VarTagTest
Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag
@author Daniel O'Connor <daniel.oconnor@gmail.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\VarTagTest extends \phpDocumentor\Reflection\DocBlock\Tag\PHPUnit_Framework_TestCase
Expanded class hierarchy of VarTagTest
File
- vendor/
phpdocumentor/ reflection-docblock/ tests/ phpDocumentor/ Reflection/ DocBlock/ Tag/ VarTagTest.php, line 23
Namespace
phpDocumentor\Reflection\DocBlock\TagView source
class VarTagTest extends \PHPUnit_Framework_TestCase {
/**
* Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can
* understand the @var doc block.
*
* @param string $type
* @param string $content
* @param string $exType
* @param string $exVariable
* @param string $exDescription
*
* @covers \phpDocumentor\Reflection\DocBlock\Tag\VarTag
* @dataProvider provideDataForConstuctor
*
* @return void
*/
public function testConstructorParesInputsIntoCorrectFields($type, $content, $exType, $exVariable, $exDescription) {
$tag = new VarTag($type, $content);
$this
->assertEquals($type, $tag
->getName());
$this
->assertEquals($exType, $tag
->getType());
$this
->assertEquals($exVariable, $tag
->getVariableName());
$this
->assertEquals($exDescription, $tag
->getDescription());
}
/**
* Data provider for testConstructorParesInputsIntoCorrectFields
*
* @return array
*/
public function provideDataForConstuctor() {
// $type, $content, $exType, $exVariable, $exDescription
return array(
array(
'var',
'int',
'int',
'',
'',
),
array(
'var',
'int $bob',
'int',
'$bob',
'',
),
array(
'var',
'int $bob Number of bobs',
'int',
'$bob',
'Number of bobs',
),
array(
'var',
'',
'',
'',
'',
),
);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VarTagTest:: |
public | function | Data provider for testConstructorParesInputsIntoCorrectFields | |
VarTagTest:: |
public | function | Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can understand the |