3 * phpDocumentor Source Tag Test
7 * @author Vasil Rangelov <boen.robot@gmail.com>
8 * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
9 * @license http://www.opensource.org/licenses/mit-license.php MIT
10 * @link http://phpdoc.org
13 namespace phpDocumentor\Reflection\DocBlock\Tag;
16 * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SourceTag
18 * @author Vasil Rangelov <boen.robot@gmail.com>
19 * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
20 * @license http://www.opensource.org/licenses/mit-license.php MIT
21 * @link http://phpdoc.org
23 class SourceTagTest extends \PHPUnit_Framework_TestCase
26 * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can
27 * understand the @source DocBlock.
30 * @param string $content
31 * @param string $exContent
32 * @param string $exStartingLine
33 * @param string $exLineCount
35 * @covers \phpDocumentor\Reflection\DocBlock\Tag\SourceTag
36 * @dataProvider provideDataForConstuctor
40 public function testConstructorParesInputsIntoCorrectFields(
48 $tag = new SourceTag($type, $content);
50 $this->assertEquals($type, $tag->getName());
51 $this->assertEquals($exContent, $tag->getContent());
52 $this->assertEquals($exDescription, $tag->getDescription());
53 $this->assertEquals($exStartingLine, $tag->getStartingLine());
54 $this->assertEquals($exLineCount, $tag->getLineCount());
58 * Data provider for testConstructorParesInputsIntoCorrectFields
62 public function provideDataForConstuctor()
64 // $type, $content, $exContent, $exDescription, $exStartingLine, $exLineCount
92 '2 3 Testing comments',
93 '2 3 Testing comments',
100 '2 -1 Testing comments',
101 '2 -1 Testing comments',
102 '-1 Testing comments',
108 '-1 1 Testing comments',
109 '-1 1 Testing comments',
110 '-1 1 Testing comments',