Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function testSend(): void |
||
16 | { |
||
17 | $expectedMessage = $this->buildMessage(); |
||
18 | $expectedException = new RuntimeException(); |
||
19 | |||
20 | $transport = $this->buildTransport(); |
||
21 | $wrapper = new IgnoreErrorTransportWrapper($transport); |
||
22 | |||
23 | $transport->expects($this->once()) |
||
24 | ->method('send') |
||
25 | ->with($expectedMessage) |
||
26 | ->willThrowException($expectedException); |
||
27 | |||
28 | $bytes = $wrapper->send($expectedMessage); |
||
29 | $lastError = $wrapper->getLastError(); |
||
30 | |||
31 | self::assertEquals(0, $bytes); |
||
32 | self::assertSame($expectedException, $lastError); |
||
33 | } |
||
45 |