1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 22 Feb 2025 16:50:47 +0100
Subject: Modernize PHPUnit syntax
---
tests/CoerceTest.php | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/CoerceTest.php b/tests/CoerceTest.php
index f1048e9..d701e91 100644
--- a/tests/CoerceTest.php
+++ b/tests/CoerceTest.php
@@ -5,15 +5,15 @@ declare(strict_types=1);
namespace League\HTMLToMarkdown\Test;
use League\HTMLToMarkdown\Coerce;
+use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
final class CoerceTest extends TestCase
{
/**
- * @dataProvider provideStringTestCases
- *
* @param mixed $val
*/
+ #[DataProvider('provideStringTestCases')]
public function testToString($val, string $expected): void
{
$this->assertSame($expected, Coerce::toString($val));
@@ -30,10 +30,9 @@ final class CoerceTest extends TestCase
}
/**
- * @dataProvider provideInvalidStringTestCases
- *
* @param mixed $val
*/
+ #[DataProvider('provideInvalidStringTestCases')]
public function testToStringThrowsOnUncoercableValue($val): void
{
$this->expectException(\InvalidArgumentException::class);
|