| @@ 159-170 (lines=12) @@ | ||
| 156 | $this->assertSame(true, $payment->isCaptureable()); |
|
| 157 | } |
|
| 158 | ||
| 159 | public function testIsRefundable1() |
|
| 160 | { |
|
| 161 | $payment = new Payment(); |
|
| 162 | ||
| 163 | $payment |
|
| 164 | ->setCapturedAmount(new Money(10000, new Currency('DKK'))) |
|
| 165 | ->setRefundedAmount(new Money(10000, new Currency('DKK'))) |
|
| 166 | ->setCurrencySymbol('DKK') |
|
| 167 | ; |
|
| 168 | ||
| 169 | $this->assertSame(false, $payment->isRefundable()); |
|
| 170 | } |
|
| 171 | ||
| 172 | public function testIsRefundable2() |
|
| 173 | { |
|
| @@ 172-184 (lines=13) @@ | ||
| 169 | $this->assertSame(false, $payment->isRefundable()); |
|
| 170 | } |
|
| 171 | ||
| 172 | public function testIsRefundable2() |
|
| 173 | { |
|
| 174 | $payment = new Payment(); |
|
| 175 | ||
| 176 | $payment |
|
| 177 | ->setCapturedAmount(new Money(10000, new Currency('DKK'))) |
|
| 178 | ->setRefundedAmount(new Money(5000, new Currency('DKK'))) |
|
| 179 | ->setSupportsMultipleRefunds(false) |
|
| 180 | ->setCurrencySymbol('DKK') |
|
| 181 | ; |
|
| 182 | ||
| 183 | $this->assertSame(false, $payment->isRefundable()); |
|
| 184 | } |
|
| 185 | ||
| 186 | public function testIsRefundable3() |
|
| 187 | { |
|
| @@ 186-197 (lines=12) @@ | ||
| 183 | $this->assertSame(false, $payment->isRefundable()); |
|
| 184 | } |
|
| 185 | ||
| 186 | public function testIsRefundable3() |
|
| 187 | { |
|
| 188 | $payment = new Payment(); |
|
| 189 | ||
| 190 | $payment |
|
| 191 | ->setCapturedAmount(new Money(10000, new Currency('DKK'))) |
|
| 192 | ->setRefundedAmount(new Money(0, new Currency('DKK'))) |
|
| 193 | ->setCurrencySymbol('DKK') |
|
| 194 | ; |
|
| 195 | ||
| 196 | $this->assertSame(true, $payment->isRefundable()); |
|
| 197 | } |
|
| 198 | } |
|
| 199 | ||