diff --git a/Tests/Twig/Extension/CurrencyExtensionTest.php b/Tests/Twig/Extension/CurrencyExtensionTest.php index 3e0b00f6..dfd9fdf0 100644 --- a/Tests/Twig/Extension/CurrencyExtensionTest.php +++ b/Tests/Twig/Extension/CurrencyExtensionTest.php @@ -6,6 +6,7 @@ use Locale; use Money\Currency; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Tbbc\MoneyBundle\Formatter\MoneyFormatter; use Tbbc\MoneyBundle\Twig\Extension\CurrencyExtension; @@ -30,9 +31,7 @@ public function testName(): void self::assertSame('tbbc_money_currency_extension', $this->extension->getName()); } - /** - * @dataProvider getCurrencyTests - */ + #[DataProvider('getCurrencyTests')] public function testCurrency($template, $expected): void { $this->assertSame($expected, $this->getTemplate($template)->render($this->variables)); diff --git a/Tests/Twig/Extension/MoneyExtensionTest.php b/Tests/Twig/Extension/MoneyExtensionTest.php index 30fc68af..0b498d3a 100644 --- a/Tests/Twig/Extension/MoneyExtensionTest.php +++ b/Tests/Twig/Extension/MoneyExtensionTest.php @@ -7,6 +7,7 @@ use Locale; use Money\Currency; use Money\Money; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Tbbc\MoneyBundle\Formatter\MoneyFormatter; @@ -52,9 +53,7 @@ public function testName(): void self::assertSame('tbbc_money_extension', $this->extension->getName()); } - /** - * @dataProvider getMoneyTests - */ + #[DataProvider('getMoneyTests')] public function testMoney($template, $expected): void { $this->assertSame($expected, $this->getTemplate($template)->render($this->variables)); diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index e69de29b..380b8aa9 100644 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -0,0 +1,7 @@ +