from('some@email.host') ->to('foo@bar.baz', 'Test Tester ') ->subject('Testing') ->text('Message body'); $transport = new LogTransport($logger); $transport->send($email); $this->assertTrue($logger->hasDebugThatContains('Send mail to')); } /** * @covers \Engelsystem\Mail\Transport\LogTransport::__toString */ public function testToString() { /** @var LoggerInterface|MockObject $logger */ $logger = $this->getMockForAbstractClass(LoggerInterface::class); $transport = new LogTransport($logger); $this->assertEquals('log://', (string)$transport); } }