BookedCreditTypeTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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