Completed
Pull Request — master (#221)
by Pol
05:19
created

testDocblockWithIncompleteAnnotations()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 9.6333
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of phpDocumentor.
7
 *
8
 *  For the full copyright and license information, please view the LICENSE
9
 *  file that was distributed with this source code.
10
 *
11
 *  @link      http://phpdoc.org
12
 */
13
14
namespace phpDocumentor\Reflection;
15
16
use Mockery as m;
17
use phpDocumentor\Reflection\DocBlock\Description;
18
use PHPUnit\Framework\TestCase;
19
20
/**
21
 * @coversNothing
22
 */
23
final class DocblocksWithIncompleteAnnotationsTest extends TestCase
24
{
25
    /**
26
     * Call Mockery::close after each test.
27
     */
28
    public function tearDown(): void
29
    {
30
        m::close();
31
    }
32
33
    public function testDocblockWithIncompleteAnnotations(): void
34
    {
35
        $docComment = <<<DOCCOMMENT
36
            /**
37
     * Hello just a test
38
     *
39
     * @var
40
     */
41
DOCCOMMENT;
42
43
        $factory = DocBlockFactory::createInstance();
44
        $docblock = $factory->create($docComment);
45
46
        $this::assertCount(1, $docblock->getTags());
47
48
        foreach ($docblock->getTags() as $index => $tag) {
49
            $this::assertNull($tag->getDescription());
50
        }
51
    }
52
}
53