1 | <?php |
||
27 | class NrbTest extends TestCase |
||
28 | { |
||
29 | public function testBankAccountValid() |
||
30 | { |
||
31 | $defNr = '13 1020-2791 2123 5389 7801 0731'; |
||
32 | $res = new Nrb($defNr); |
||
33 | $this->assertEquals('13102027912123538978010731', $res->get()); |
||
34 | $this->assertEquals('102', $res->getBank()); |
||
35 | $this->assertEquals('10202791', $res->getBankDepartment()); |
||
36 | } |
||
37 | |||
38 | public function testCreate() |
||
43 | |||
44 | /** |
||
45 | * @expectedException \mrcnpdlk\Validator\Exception |
||
46 | */ |
||
47 | public function testBankAccountInvalidChecksum() |
||
51 | |||
52 | /** |
||
53 | * @expectedException \mrcnpdlk\Validator\Exception |
||
54 | */ |
||
55 | public function testBankAccountInvalidRegex() |
||
59 | |||
60 | /** |
||
61 | * @expectedException \mrcnpdlk\Validator\Exception |
||
62 | */ |
||
63 | public function testBankAccountInvalidBankDepartment() |
||
67 | |||
68 | } |
||
69 |