Skip to content

Commit 3987573

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 49a6397 + cd06f2c commit 3987573

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

Tests/MessageMediaTransportTest.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,34 @@
1919
use Symfony\Component\Notifier\Message\MessageInterface;
2020
use Symfony\Component\Notifier\Message\SmsMessage;
2121
use Symfony\Component\Notifier\Test\TransportTestCase;
22+
use Symfony\Component\Notifier\Tests\Fixtures\DummyHttpClient;
23+
use Symfony\Component\Notifier\Tests\Fixtures\DummyMessage;
24+
use Symfony\Component\Notifier\Transport\TransportInterface;
2225
use Symfony\Contracts\HttpClient\HttpClientInterface;
2326
use Symfony\Contracts\HttpClient\ResponseInterface;
2427

2528
final class MessageMediaTransportTest extends TransportTestCase
2629
{
27-
public function createTransport(HttpClientInterface $client = null, string $from = null): MessageMediaTransport
30+
public static function createTransport(HttpClientInterface $client = null, string $from = null): MessageMediaTransport
2831
{
29-
return new MessageMediaTransport('apiKey', 'apiSecret', $from, $client ?? $this->createMock(HttpClientInterface::class));
32+
return new MessageMediaTransport('apiKey', 'apiSecret', $from, $client ?? new DummyHttpClient());
3033
}
3134

32-
public function toStringProvider(): iterable
35+
public static function toStringProvider(): iterable
3336
{
34-
yield ['messagemedia://api.messagemedia.com', $this->createTransport()];
35-
yield ['messagemedia://api.messagemedia.com?from=TEST', $this->createTransport(null, 'TEST')];
37+
yield ['messagemedia://api.messagemedia.com', self::createTransport()];
38+
yield ['messagemedia://api.messagemedia.com?from=TEST', self::createTransport(null, 'TEST')];
3639
}
3740

38-
public function supportedMessagesProvider(): iterable
41+
public static function supportedMessagesProvider(): iterable
3942
{
4043
yield [new SmsMessage('0491570156', 'Hello!')];
4144
}
4245

43-
public function unsupportedMessagesProvider(): iterable
46+
public static function unsupportedMessagesProvider(): iterable
4447
{
4548
yield [new ChatMessage('Hello!')];
46-
yield [$this->createMock(MessageInterface::class)];
49+
yield [new DummyMessage()];
4750
}
4851

4952
/**

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\\MessageMedia\\": "" },

0 commit comments

Comments
 (0)