BookedCreditTypeTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetterSetters() 0 14 1
1
<?php
2
3
namespace JhFlexiTimeTest\Entity;
4
5
use JhFlexiTime\Entity\BookedCreditType;
6
use PHPUnit_Framework_TestCase;
7
8
/**
9
 * Class BookedCreditTypeTest
10
 * @package JhFlexiTimeTest\Entity
11
 * @author  Aydin Hassan <[email protected]>
12
 */
13
class BookedCreditTypeTest extends PHPUnit_Framework_TestCase
14
{
15
    /**
16
     * @var BookedCreditType
17
     */
18
    protected $entity;
19
20
    public function setUp()
21
    {
22
        $this->entity = new BookedCreditType;
23
    }
24
25
    public function testGetterSetters()
26
    {
27
        $this->assertNull($this->entity->getId());
28
        $this->assertNull($this->entity->getShortName());
29
        $this->assertNull($this->entity->getLabel());
30
31
        $this->entity->setId(2);
32
        $this->entity->setShortName('ot');
33
        $this->entity->setLabel('Overtime');
34
35
        $this->assertSame(2, $this->entity->getId());
36
        $this->assertSame('ot', $this->entity->getShortName());
37
        $this->assertSame('Overtime', $this->entity->getLabel());
38
    }
39
}
40