| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 18 | public function test_send() |
||
| 19 | { |
||
| 20 | $message = new Message(); |
||
| 21 | |||
| 22 | $message->setFrom('[email protected]'); |
||
| 23 | $message->addTo('[email protected]'); |
||
| 24 | $message->setSubject('Subject'); |
||
| 25 | |||
| 26 | /** @var Mock|SendgridTransport $transport */ |
||
| 27 | $transport = \Mockery::mock(SendgridTransport::class)->shouldAllowMockingProtectedMethods()->makePartial(); |
||
| 28 | $transport->shouldReceive('sendApiCall')->andReturn(1); |
||
| 29 | |||
| 30 | self::assertSame(1, $transport->send($message)); |
||
| 31 | |||
| 32 | $mail = $transport->getMail(); |
||
| 33 | self::assertInstanceOf(SendGrid\Mail\Mail::class, $mail); |
||
| 34 | } |
||
| 36 |