|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Tests\Fhp\Model; |
|
4
|
|
|
|
|
5
|
|
|
use Fhp\Model\Account; |
|
6
|
|
|
|
|
7
|
|
|
class AccountTest extends \PHPUnit_Framework_TestCase |
|
8
|
|
|
{ |
|
9
|
|
|
public function test_getter_and_setter() |
|
10
|
|
|
{ |
|
11
|
|
|
$obj = new Account(); |
|
12
|
|
|
$this->assertNull($obj->getId()); |
|
13
|
|
|
$this->assertNull($obj->getAccountDescription()); |
|
14
|
|
|
$this->assertNull($obj->getAccountNumber()); |
|
15
|
|
|
$this->assertNull($obj->getAccountOwnerName()); |
|
16
|
|
|
$this->assertNull($obj->getBankCode()); |
|
17
|
|
|
$this->assertNull($obj->getCurrency()); |
|
18
|
|
|
$this->assertNull($obj->getCustomerId()); |
|
19
|
|
|
$this->assertNull($obj->getIban()); |
|
20
|
|
|
|
|
21
|
|
|
// test id |
|
22
|
|
|
$obj->setId(10); |
|
23
|
|
|
$this->assertSame(10, $obj->getId()); |
|
24
|
|
|
|
|
25
|
|
|
// test description |
|
26
|
|
|
$obj->setAccountDescription('Description'); |
|
27
|
|
|
$this->assertSame('Description', $obj->getAccountDescription()); |
|
28
|
|
|
|
|
29
|
|
|
// test account number |
|
30
|
|
|
$obj->setAccountNumber('123123123'); |
|
31
|
|
|
$this->assertSame('123123123', $obj->getAccountNumber()); |
|
32
|
|
|
|
|
33
|
|
|
// test account owner name |
|
34
|
|
|
$obj->setAccountOwnerName('The Owner'); |
|
35
|
|
|
$this->assertSame('The Owner', $obj->getAccountOwnerName()); |
|
36
|
|
|
|
|
37
|
|
|
// test bank code |
|
38
|
|
|
$obj->setBankCode('123123123'); |
|
39
|
|
|
$this->assertSame('123123123', $obj->getBankCode()); |
|
40
|
|
|
|
|
41
|
|
|
// test currency |
|
42
|
|
|
$obj->setCurrency('EUR'); |
|
43
|
|
|
$this->assertSame('EUR', $obj->getCurrency()); |
|
44
|
|
|
|
|
45
|
|
|
// test customer ID |
|
46
|
|
|
$obj->setCustomerId('123123123'); |
|
47
|
|
|
$this->assertSame('123123123', $obj->getCustomerId()); |
|
48
|
|
|
|
|
49
|
|
|
// test iban |
|
50
|
|
|
$obj->setIban('DE123123123123'); |
|
51
|
|
|
$this->assertSame('DE123123123123', $obj->getIban()); |
|
52
|
|
|
} |
|
53
|
|
|
} |
|
54
|
|
|
|