SaldoTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_getter_and_setter() 0 19 1
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