Skip to content

Commit 693ce9e

Browse files
Merge branch '5.4' into 6.2
* 5.4: [Cache] fix trying to load Memcached before checking we can [Notifier] Make `TransportTestCase` data providers static [Notifier] Add missing use statement
2 parents ec134dc + 9e132b6 commit 693ce9e

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

Tests/ZulipTransportTest.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,31 @@
1616
use Symfony\Component\Notifier\Message\MessageInterface;
1717
use Symfony\Component\Notifier\Message\SmsMessage;
1818
use Symfony\Component\Notifier\Test\TransportTestCase;
19+
use Symfony\Component\Notifier\Tests\Fixtures\DummyHttpClient;
20+
use Symfony\Component\Notifier\Tests\Fixtures\DummyMessage;
21+
use Symfony\Component\Notifier\Transport\TransportInterface;
1922
use Symfony\Contracts\HttpClient\HttpClientInterface;
2023

2124
final class ZulipTransportTest extends TransportTestCase
2225
{
23-
public function createTransport(HttpClientInterface $client = null): ZulipTransport
26+
public static function createTransport(HttpClientInterface $client = null): ZulipTransport
2427
{
25-
return (new ZulipTransport('testEmail', 'testToken', 'testChannel', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('test.host');
28+
return (new ZulipTransport('testEmail', 'testToken', 'testChannel', $client ?? new DummyHttpClient()))->setHost('test.host');
2629
}
2730

28-
public function toStringProvider(): iterable
31+
public static function toStringProvider(): iterable
2932
{
30-
yield ['zulip://test.host?channel=testChannel', $this->createTransport()];
33+
yield ['zulip://test.host?channel=testChannel', self::createTransport()];
3134
}
3235

33-
public function supportedMessagesProvider(): iterable
36+
public static function supportedMessagesProvider(): iterable
3437
{
3538
yield [new ChatMessage('Hello!')];
3639
}
3740

38-
public function unsupportedMessagesProvider(): iterable
41+
public static function unsupportedMessagesProvider(): iterable
3942
{
4043
yield [new SmsMessage('0611223344', 'Hello!')];
41-
yield [$this->createMock(MessageInterface::class)];
44+
yield [new DummyMessage()];
4245
}
4346
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=8.1",
2020
"symfony/http-client": "^5.4|^6.0",
21-
"symfony/notifier": "^6.2"
21+
"symfony/notifier": "^6.2.7"
2222
},
2323
"autoload": {
2424
"psr-4": { "Symfony\\Component\\Notifier\\Bridge\\Zulip\\": "" },

0 commit comments

Comments
 (0)