| @@ 12-20 (lines=9) @@ | ||
| 9 | ||
| 10 | class PaymentLineTest extends TestCase |
|
| 11 | { |
|
| 12 | public function testGettersSetters() |
|
| 13 | { |
|
| 14 | $price = new Money(1, new Currency('DKK')); |
|
| 15 | $paymentLine = new PaymentLine('product_number', 'name', 1, $price, 25); |
|
| 16 | $paymentLine->setId(1); |
|
| 17 | ||
| 18 | $this->assertSame(1, $paymentLine->getId()); |
|
| 19 | $this->assertEquals($price, $paymentLine->getPrice()); |
|
| 20 | } |
|
| 21 | ||
| 22 | public function testZeroAmount() |
|
| 23 | { |
|
| @@ 22-29 (lines=8) @@ | ||
| 19 | $this->assertEquals($price, $paymentLine->getPrice()); |
|
| 20 | } |
|
| 21 | ||
| 22 | public function testZeroAmount() |
|
| 23 | { |
|
| 24 | $price = new Money(0, new Currency('DKK')); |
|
| 25 | $paymentLine = new PaymentLine('product_number', 'name', 1, $price, 25); |
|
| 26 | $paymentLine->setId(1); |
|
| 27 | ||
| 28 | $this->assertEquals($price, $paymentLine->getPrice()); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||