3 * phpDocumentor Example 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\ExampleTag
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 ExampleTagTest 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
34 * @param string $exFilepath
36 * @covers \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag
37 * @dataProvider provideDataForConstuctor
41 public function testConstructorParesInputsIntoCorrectFields(
50 $tag = new ExampleTag($type, $content);
52 $this->assertEquals($type, $tag->getName());
53 $this->assertEquals($exContent, $tag->getContent());
54 $this->assertEquals($exDescription, $tag->getDescription());
55 $this->assertEquals($exStartingLine, $tag->getStartingLine());
56 $this->assertEquals($exLineCount, $tag->getLineCount());
57 $this->assertEquals($exFilePath, $tag->getFilePath());
61 * Data provider for testConstructorParesInputsIntoCorrectFields
65 public function provideDataForConstuctor()
104 'file.php 2 3 Testing comments',
105 'file.php 2 3 Testing comments',
113 'file.php 2 -1 Testing comments',
114 'file.php 2 -1 Testing comments',
115 '-1 Testing comments',
122 'file.php -1 1 Testing comments',
123 'file.php -1 1 Testing comments',
124 '-1 1 Testing comments',
131 '"file with spaces.php" Testing comments',
132 '"file with spaces.php" Testing comments',
136 'file with spaces.php'
140 '"file with spaces.php" 2 Testing comments',
141 '"file with spaces.php" 2 Testing comments',
145 'file with spaces.php'
149 '"file with spaces.php" 2 3 Testing comments',
150 '"file with spaces.php" 2 3 Testing comments',
154 'file with spaces.php'
158 '"file with spaces.php" 2 -3 Testing comments',
159 '"file with spaces.php" 2 -3 Testing comments',
160 '-3 Testing comments',
163 'file with spaces.php'
167 '"file with spaces.php" -2 3 Testing comments',
168 '"file with spaces.php" -2 3 Testing comments',
169 '-2 3 Testing comments',
172 'file with spaces.php'
176 'file%20with%20spaces.php Testing comments',
177 'file%20with%20spaces.php Testing comments',
181 'file with spaces.php'
185 'folder/file%20with%20spaces.php Testing comments',
186 'folder/file%20with%20spaces.php Testing comments',
190 'folder/file with spaces.php'
194 'http://example.com/file%20with%20spaces.php Testing comments',
195 'http://example.com/file%20with%20spaces.php Testing comments',
199 'http://example.com/file%20with%20spaces.php'