Conditions | 3 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
55 | protected function failingDriverMock() |
||
56 | { |
||
57 | $driverMock = $this->createMock(Driver::class); |
||
58 | |||
59 | $driverMock->expects($this->any()) |
||
60 | ->method('connect') |
||
61 | ->will($this->returnCallback(function (array $params) { |
||
62 | if (isset($params['fail']) && $params['fail']) { |
||
63 | throw $this->createMock(ConnectionException::class); |
||
64 | } |
||
65 | |||
66 | return $this->createMock(DriverConnection::class); |
||
67 | })); |
||
68 | |||
69 | return $driverMock; |
||
70 | } |
||
72 |