Skip to content

Commit dc465ca

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Cache] fix trying to load Memcached before checking we can add missing variable [Notifier] Make `TransportTestCase` data providers static Fix PHPUnit 9.6 deprecations [Notifier] Add missing use statement [Security] fix compat with security-core v6 use proper methods to assert exception messages contain certain strings Fix tests replace usages of the deprecated PHPUnit getMockClass() method [gha] Fix high-deps to run with Symfony 6+ Fix PHPDoc (wrong order)
2 parents 40df43e + e201a3a commit dc465ca

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Tests/GitterTransportTest.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,36 @@
1313

1414
use Symfony\Component\Notifier\Bridge\Gitter\GitterTransport;
1515
use Symfony\Component\Notifier\Message\ChatMessage;
16-
use Symfony\Component\Notifier\Message\MessageInterface;
1716
use Symfony\Component\Notifier\Message\SmsMessage;
1817
use Symfony\Component\Notifier\Test\TransportTestCase;
18+
use Symfony\Component\Notifier\Tests\Fixtures\DummyHttpClient;
19+
use Symfony\Component\Notifier\Tests\Fixtures\DummyMessage;
20+
use Symfony\Component\Notifier\Transport\TransportInterface;
1921
use Symfony\Contracts\HttpClient\HttpClientInterface;
2022

2123
/**
2224
* @author Christin Gruber <c.gruber@touchdesign.de>
2325
*/
2426
final class GitterTransportTest extends TransportTestCase
2527
{
26-
public function createTransport(HttpClientInterface $client = null): GitterTransport
28+
public static function createTransport(HttpClientInterface $client = null): GitterTransport
2729
{
28-
return (new GitterTransport('token', '5539a3ee5etest0d3255bfef', $client ?? $this->createMock(HttpClientInterface::class)))->setHost('api.gitter.im');
30+
return (new GitterTransport('token', '5539a3ee5etest0d3255bfef', $client ?? new DummyHttpClient()))->setHost('api.gitter.im');
2931
}
3032

31-
public function toStringProvider(): iterable
33+
public static function toStringProvider(): iterable
3234
{
33-
yield ['gitter://api.gitter.im?room_id=5539a3ee5etest0d3255bfef', $this->createTransport()];
35+
yield ['gitter://api.gitter.im?room_id=5539a3ee5etest0d3255bfef', self::createTransport()];
3436
}
3537

36-
public function supportedMessagesProvider(): iterable
38+
public static function supportedMessagesProvider(): iterable
3739
{
3840
yield [new ChatMessage('Hello!')];
3941
}
4042

41-
public function unsupportedMessagesProvider(): iterable
43+
public static function unsupportedMessagesProvider(): iterable
4244
{
4345
yield [new SmsMessage('0611223344', 'Hello!')];
44-
yield [$this->createMock(MessageInterface::class)];
46+
yield [new DummyMessage()];
4547
}
4648
}

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

0 commit comments

Comments
 (0)