[Notifier][Free Mobile] Tests

This commit is contained in:
Oskar Stark 2020-12-09 13:53:43 +01:00
parent ec09d68df1
commit f7d5c48313

View File

@ -33,7 +33,7 @@ final class FreeMobileTransportTest extends TestCase
$this->assertTrue($transport->supports(new SmsMessage('0611223344', 'Hello!')));
$this->assertFalse($transport->supports(new SmsMessage('0699887766', 'Hello!')));
$this->assertFalse($transport->supports($this->createMock(MessageInterface::class), 'Hello!'));
$this->assertFalse($transport->supports($this->createMock(MessageInterface::class)));
}
public function testSendNonSmsMessageThrowsException(): void
@ -42,6 +42,15 @@ final class FreeMobileTransportTest extends TestCase
$this->expectException(LogicException::class);
$transport->send($this->createMock(MessageInterface::class));
}
public function testSendSmsMessageButInvalidPhoneThrowsException(): void
{
$transport = $this->initTransport();
$this->expectException(LogicException::class);
$transport->send(new SmsMessage('0699887766', 'Hello!'));
}