CoversTagTest.php in Zircon Profile 8
Same filename and directory in other branches
Namespace
phpDocumentor\Reflection\DocBlock\TagFile
vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.phpView source
<?php
/**
* phpDocumentor Covers Tag Test
*
* PHP version 5.3
*
* @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
*/
namespace phpDocumentor\Reflection\DocBlock\Tag;
/**
* Test class for \phpDocumentor\Reflection\DocBlock\Tag\CoversTag
*
* @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
*/
class CoversTagTest extends \PHPUnit_Framework_TestCase {
/**
* Test that the \phpDocumentor\Reflection\DocBlock\Tag\CoversTag can create
* a link for the covers doc block.
*
* @param string $type
* @param string $content
* @param string $exContent
* @param string $exReference
*
* @covers \phpDocumentor\Reflection\DocBlock\Tag\CoversTag
* @dataProvider provideDataForConstuctor
*
* @return void
*/
public function testConstructorParesInputsIntoCorrectFields($type, $content, $exContent, $exDescription, $exReference) {
$tag = new CoversTag($type, $content);
$this
->assertEquals($type, $tag
->getName());
$this
->assertEquals($exContent, $tag
->getContent());
$this
->assertEquals($exDescription, $tag
->getDescription());
$this
->assertEquals($exReference, $tag
->getReference());
}
/**
* Data provider for testConstructorParesInputsIntoCorrectFields
*
* @return array
*/
public function provideDataForConstuctor() {
// $type, $content, $exContent, $exDescription, $exReference
return array(
array(
'covers',
'Foo::bar()',
'Foo::bar()',
'',
'Foo::bar()',
),
array(
'covers',
'Foo::bar() Testing',
'Foo::bar() Testing',
'Testing',
'Foo::bar()',
),
array(
'covers',
'Foo::bar() Testing comments',
'Foo::bar() Testing comments',
'Testing comments',
'Foo::bar()',
),
);
}
}
Classes
Name | Description |
---|---|
CoversTagTest | Test class for \phpDocumentor\Reflection\DocBlock\Tag\CoversTag |