| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public function testShouldReleaseEscrow() |
||
| 10 | { |
||
| 11 | $this->mockHttpSession($this->body_order); |
||
| 12 | $order = $this->createOrder()->create(); |
||
| 13 | $cc = '5555666677778884'; |
||
| 14 | $this->mockHttpSession($this->body_cc_pay_pci_escrow); |
||
| 15 | $payment = $order->payments() |
||
|
|
|||
| 16 | ->setCreditCard(5, 2018, $cc, 123, $this->createCustomer(), false) |
||
| 17 | ->setEscrow('teste de descricao') |
||
| 18 | ->execute(); |
||
| 19 | $this->mockHttpSession($this->body_release_escrow); |
||
| 20 | $escrow = $payment->escrows()->release(); |
||
| 21 | $this->assertEquals('RELEASED', $escrow->getStatus()); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: