SinceDescriptorTest   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 testSetAndGetVersion() 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 SinceDescriptor class.
16
 */
17
class SinceDescriptorTest extends \Mockery\Adapter\Phpunit\MockeryTestCase
18
{
19
    const EXAMPLE_VERSION = 'version';
20
21
    /** @var SinceDescriptor $fixture */
22
    protected $fixture;
23
24
    /**
25
     * Creates a new fixture object.
26
     */
27
    protected function setUp()
28
    {
29
        $this->fixture = new SinceDescriptor('name');
30
    }
31
32
    /**
33
     * @covers phpDocumentor\Descriptor\Tag\SinceDescriptor::setVersion
34
     * @covers phpDocumentor\Descriptor\Tag\SinceDescriptor::getVersion
35
     */
36
    public function testSetAndGetVersion()
37
    {
38
        $this->assertEmpty($this->fixture->getVersion());
39
40
        $this->fixture->setVersion(self::EXAMPLE_VERSION);
41
        $result = $this->fixture->getVersion();
42
43
        $this->assertEquals(self::EXAMPLE_VERSION, $result);
44
    }
45
}
46