| @@ 30-44 (lines=15) @@ | ||
| 27 | $this->assertEquals('ABN', $method->invoke($this->engine)); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function testParsesAllFoundStatements() |
|
| 31 | { |
|
| 32 | $statements = $this->engine->parse(); |
|
| 33 | ||
| 34 | $this->assertCount(4, $statements); |
|
| 35 | $first = $statements[0]; |
|
| 36 | $last = end($statements); |
|
| 37 | ||
| 38 | $this->assertEquals('23-06-2009', $first->getStartTimestamp('d-m-Y')); |
|
| 39 | $this->assertEquals('24-06-2009', $first->getEndTimestamp('d-m-Y')); |
|
| 40 | $this->assertEquals(210.5, $first->getDeltaPrice()); |
|
| 41 | ||
| 42 | $this->assertEquals('23-06-2009', $last->getStartTimestamp('d-m-Y')); |
|
| 43 | $this->assertEquals('24-06-2009', $last->getEndTimestamp('d-m-Y')); |
|
| 44 | } |
|
| 45 | ||
| 46 | public function testHandleEntryYearRollover() |
|
| 47 | { |
|
| @@ 30-41 (lines=12) @@ | ||
| 27 | $this->assertEquals('Rabo', $method->invoke($this->engine)); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function testParsesAllFoundStatements() |
|
| 31 | { |
|
| 32 | $statements = $this->engine->parse(); |
|
| 33 | ||
| 34 | $this->assertCount(39, $statements); |
|
| 35 | $first = $statements[0]; |
|
| 36 | $last = end($statements); |
|
| 37 | $this->assertEquals('06-01-2003', $first->getStartTimestamp('d-m-Y')); |
|
| 38 | $this->assertEquals('07-01-2003', $first->getEndTimestamp('d-m-Y')); |
|
| 39 | $this->assertEquals('08-01-2003', $last->getStartTimestamp('d-m-Y')); |
|
| 40 | $this->assertEquals('09-01-2003', $last->getEndTimestamp('d-m-Y')); |
|
| 41 | } |
|
| 42 | ||
| 43 | public function testInitialNegativeStatementBalance() |
|
| 44 | { |
|