| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function shouldThrowExceptionWithWrongParams() |
||
| 31 | { |
||
| 32 | $this->expectException(\WebToPayException::class); |
||
| 33 | $expectedModel = array('foo' => 'fooVal'); |
||
| 34 | |||
| 35 | $apiMock = $this->createMock(Api::class); |
||
| 36 | $action = new NotifyAction(); |
||
| 37 | $gatewayMock = $this->createGatewayMock(); |
||
| 38 | $gatewayMock |
||
| 39 | ->expects($this->once()) |
||
| 40 | ->method('execute') |
||
| 41 | ->with($this->isInstanceOf(GetHttpRequest::class)); |
||
| 42 | $apiMock |
||
| 43 | ->expects($this->once()) |
||
| 44 | ->method('doNotify'); |
||
| 45 | |||
| 46 | $action->setGateway($gatewayMock); |
||
| 47 | $action->setApi($apiMock); |
||
| 48 | |||
| 49 | $action->execute(new Notify($expectedModel)); |
||
| 50 | } |
||
| 61 | } |