[Notifier][Telegram] Remove void return type from test methods
This commit is contained in:
parent
97c6be6de9
commit
e48fcdcd34
@ -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();
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user