Skip to content

Commit e9e0276

Browse files
Convert dataProvider annotations to attributes
1 parent fce1417 commit e9e0276

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Symfony/Component/Mailer/Bridge/MicrosoftGraph/Tests/Transport/MicrosoftGraphApiTransportTest.php

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

1212
namespace Symfony\Component\Mailer\Bridge\MicrosoftGraph\Tests\Transport;
1313

14+
use PHPUnit\Framework\Attributes\DataProvider;
1415
use PHPUnit\Framework\TestCase;
1516
use Symfony\Component\HttpClient\MockHttpClient;
1617
use Symfony\Component\HttpClient\Response\MockResponse;
@@ -23,9 +24,7 @@
2324

2425
class MicrosoftGraphApiTransportTest extends TestCase
2526
{
26-
/**
27-
* @dataProvider getTransportData
28-
*/
27+
#[DataProvider('getTransportData')]
2928
public function testToString(MicrosoftGraphApiTransport $transport, string $expected)
3029
{
3130
$this->assertSame($expected, (string) $transport);
@@ -230,7 +229,7 @@ public function testCustomHeader()
230229
$transport->send($mail);
231230
}
232231

233-
/** @dataProvider importanceProvider */
232+
#[DataProvider('importanceProvider')]
234233
public function testImportance(string $expected, int $priority)
235234
{
236235
$client = new MockHttpClient(function (string $method, string $url, array $options) use ($expected): ResponseInterface {

src/Symfony/Component/Mailer/Bridge/MicrosoftGraph/Tests/Transport/MicrosoftGraphTransportFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Mailer\Bridge\MicrosoftGraph\Tests\Transport;
1313

14+
use PHPUnit\Framework\Attributes\DataProvider;
1415
use Psr\Log\NullLogger;
1516
use Symfony\Component\HttpClient\MockHttpClient;
1617
use Symfony\Component\Mailer\Bridge\MicrosoftGraph\TokenManager;
@@ -76,7 +77,7 @@ public static function incompleteDsnProvider(): iterable
7677
yield [new Dsn('microsoft+graphapi', 'non-default', self::USER, self::PASSWORD, null, ['tenantId' => self::TENANT])];
7778
}
7879

79-
/** @dataProvider invalidHttpDsnProvider */
80+
#[DataProvider('invalidHttpDsnProvider')]
8081
public function testValidatesHttpNotProvided(string $graph, string $auth, string $failingType)
8182
{
8283
$factory = $this->getFactory();

0 commit comments

Comments
 (0)