From e48fcdcd3444a2413f40893129f6cb6423abaecc Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Fri, 11 Dec 2020 11:18:47 +0100 Subject: [PATCH] [Notifier][Telegram] Remove void return type from test methods --- .../Telegram/Tests/TelegramTransportFactoryTest.php | 10 +++++----- .../Bridge/Telegram/Tests/TelegramTransportTest.php | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php index c74d38f2f6..9299a283ef 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportFactoryTest.php @@ -19,7 +19,7 @@ use Symfony\Component\Notifier\Transport\Dsn; final class TelegramTransportFactoryTest extends TestCase { - public function testCreateWithDsn(): void + public function testCreateWithDsn() { $factory = new TelegramTransportFactory(); @@ -31,7 +31,7 @@ final class TelegramTransportFactoryTest extends TestCase $this->assertSame(sprintf('telegram://%s?channel=%s', $host, $channel), (string) $transport); } - public function testCreateWithNoPasswordThrowsMalformed(): void + public function testCreateWithNoPasswordThrowsMalformed() { $factory = new TelegramTransportFactory(); @@ -39,7 +39,7 @@ final class TelegramTransportFactoryTest extends TestCase $factory->create(Dsn::fromString(sprintf('telegram://%s@%s/?channel=%s', 'simpleToken', 'testHost', 'testChannel'))); } - public function testCreateWithNoTokenThrowsMalformed(): void + public function testCreateWithNoTokenThrowsMalformed() { $factory = new TelegramTransportFactory(); @@ -47,7 +47,7 @@ final class TelegramTransportFactoryTest extends TestCase $factory->create(Dsn::fromString(sprintf('telegram://%s/?channel=%s', 'testHost', 'testChannel'))); } - public function testSupportsTelegramScheme(): void + public function testSupportsTelegramScheme() { $factory = new TelegramTransportFactory(); @@ -55,7 +55,7 @@ final class TelegramTransportFactoryTest extends TestCase $this->assertFalse($factory->supports(Dsn::fromString('somethingElse://host/?channel=testChannel'))); } - public function testNonTelegramSchemeThrows(): void + public function testNonTelegramSchemeThrows() { $factory = new TelegramTransportFactory(); diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php index c9e759a52d..16b29b5396 100644 --- a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php +++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php @@ -24,7 +24,7 @@ use Symfony\Contracts\HttpClient\ResponseInterface; final class TelegramTransportTest extends TestCase { - public function testToStringContainsProperties(): void + public function testToStringContainsProperties() { $channel = 'testChannel'; @@ -34,7 +34,7 @@ final class TelegramTransportTest extends TestCase $this->assertSame(sprintf('telegram://%s?channel=%s', 'testHost', $channel), (string) $transport); } - public function testSupportsChatMessage(): void + public function testSupportsChatMessage() { $transport = new TelegramTransport('testToken', 'testChannel', $this->createMock(HttpClientInterface::class)); @@ -42,7 +42,7 @@ final class TelegramTransportTest extends TestCase $this->assertFalse($transport->supports($this->createMock(MessageInterface::class))); } - public function testSendNonChatMessageThrows(): void + public function testSendNonChatMessageThrows() { $this->expectException(LogicException::class); $transport = new TelegramTransport('testToken', 'testChannel', $this->createMock(HttpClientInterface::class)); @@ -50,7 +50,7 @@ final class TelegramTransportTest extends TestCase $transport->send($this->createMock(MessageInterface::class)); } - public function testSendWithErrorResponseThrows(): void + public function testSendWithErrorResponseThrows() { $this->expectException(TransportException::class); $this->expectExceptionMessageMatches('/testDescription.+testErrorCode/'); @@ -72,7 +72,7 @@ final class TelegramTransportTest extends TestCase $transport->send(new ChatMessage('testMessage')); } - public function testSendWithOptions(): void + public function testSendWithOptions() { $channel = 'testChannel'; @@ -129,7 +129,7 @@ JSON; $this->assertEquals('telegram://api.telegram.org?channel=testChannel', $sentMessage->getTransport()); } - public function testSendWithChannelOverride(): void + public function testSendWithChannelOverride() { $channelOverride = 'channelOverride';