| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function testGetLinkWithoutCheckout() |
||
| 10 | { |
||
| 11 | $this->sandbox_mock = self::MOCK; |
||
| 12 | $this->mockHttpSession($this->body_order); |
||
| 13 | $order = $this->createOrder()->create(); |
||
| 14 | $this->mockHttpSession($this->body_billet_pay); |
||
| 15 | $payment = $order->payments()->setBoleto(new \DateTime('today +1day'), 'http://dev.moip.com.br/images/logo-header-moip.png')->execute(); |
||
|
|
|||
| 16 | |||
| 17 | $this->assertEquals('https://checkout-sandbox.moip.com.br/boleto/PAY-XNVIBO5MIQ9S', $payment->getLinks()->getLink('payBoleto')); |
||
| 18 | } |
||
| 19 | |||
| 37 |
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: