SaldoTest::test_getter_and_setter()   A
last analyzed

Complexity

Conditions 1
Paths 1

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 1
nc 1
nop 0
1
<?php
2
3
namespace Tests\Fhp\Model;
4
5
use Fhp\Model\Saldo;
6
7
class SaldoTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function test_getter_and_setter()
10
    {
11
        $s = new Saldo();
12
        $this->assertNull($s->getCurrency());
13
        $this->assertNull($s->getAmount());
14
        $this->assertNull($s->getValuta());
15
16
        // test currency
17
        $s->setCurrency('EUR');
18
        $this->assertSame('EUR', $s->getCurrency());
19
20
        // test amount
21
        $s->setAmount(12.00);
22
        $this->assertSame(12.00, $s->getAmount());
23
24
        $d = new \DateTime();
25
        $s->setValuta($d);
26
        $this->assertEquals($d, $s->getValuta());
27
    }
28
}
29