SeeDescriptorTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 29
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testSetAndGetReference() 0 9 1
1
<?php
2
/**
3
 * phpDocumentor
4
 *
5
 * PHP Version 5.3
6
 *
7
 * @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com)
8
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
9
 * @link      http://phpdoc.org
10
 */
11
12
namespace phpDocumentor\Descriptor\Tag;
13
14
/**
15
 * Tests the functionality for the SeeDescriptor class.
16
 */
17
class SeeDescriptorTest extends \Mockery\Adapter\Phpunit\MockeryTestCase
18
{
19
    const EXAMPLE_REFERENCE = 'reference';
20
21
    /** @var SeeDescriptor $fixture */
22
    protected $fixture;
23
24
    /**
25
     * Creates a new fixture object.
26
     */
27
    protected function setUp()
28
    {
29
        $this->fixture = new SeeDescriptor('name');
30
    }
31
32
    /**
33
     * @covers phpDocumentor\Descriptor\Tag\SeeDescriptor::setReference
34
     * @covers phpDocumentor\Descriptor\Tag\SeeDescriptor::getReference
35
     */
36
    public function testSetAndGetReference()
37
    {
38
        $this->assertEmpty($this->fixture->getReference());
39
40
        $this->fixture->setReference(self::EXAMPLE_REFERENCE);
41
        $result = $this->fixture->getReference();
42
43
        $this->assertEquals(self::EXAMPLE_REFERENCE, $result);
44
    }
45
}
46