Skip to content

Commit 02dbbe4

Browse files
committed
make test case classes compatible with PHPUnit 10+
1 parent ccc5fb2 commit 02dbbe4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.2
5+
---
6+
7+
* Make `TransportFactoryTestCase` compatible with PHPUnit 10+
8+
49
7.1
510
---
611

Test/TransportFactoryTestCase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Mailer\Test;
1313

14+
use PHPUnit\Framework\Attributes\DataProvider;
1415
use PHPUnit\Framework\TestCase;
1516
use Psr\Log\LoggerInterface;
1617
use Symfony\Component\Mailer\Exception\IncompleteDsnException;
@@ -66,6 +67,7 @@ public static function incompleteDsnProvider(): iterable
6667
/**
6768
* @dataProvider supportsProvider
6869
*/
70+
#[DataProvider('supportsProvider')]
6971
public function testSupports(Dsn $dsn, bool $supports)
7072
{
7173
$factory = $this->getFactory();
@@ -76,6 +78,7 @@ public function testSupports(Dsn $dsn, bool $supports)
7678
/**
7779
* @dataProvider createProvider
7880
*/
81+
#[DataProvider('createProvider')]
7982
public function testCreate(Dsn $dsn, TransportInterface $transport)
8083
{
8184
$factory = $this->getFactory();
@@ -89,6 +92,7 @@ public function testCreate(Dsn $dsn, TransportInterface $transport)
8992
/**
9093
* @dataProvider unsupportedSchemeProvider
9194
*/
95+
#[DataProvider('unsupportedSchemeProvider')]
9296
public function testUnsupportedSchemeException(Dsn $dsn, ?string $message = null)
9397
{
9498
$factory = $this->getFactory();
@@ -104,6 +108,7 @@ public function testUnsupportedSchemeException(Dsn $dsn, ?string $message = null
104108
/**
105109
* @dataProvider incompleteDsnProvider
106110
*/
111+
#[DataProvider('incompleteDsnProvider')]
107112
public function testIncompleteDsnException(Dsn $dsn)
108113
{
109114
$factory = $this->getFactory();

0 commit comments

Comments
 (0)