From eb7e7ceecc4ac5a97e6656e672921961d421904c Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Sat, 24 Feb 2024 20:55:36 +0100 Subject: [PATCH] feat: allow PHPUnit 11 --- Tests/Twig/Extension/CurrencyExtensionTest.php | 5 ++--- Tests/Twig/Extension/MoneyExtensionTest.php | 5 ++--- Tests/bootstrap.php | 7 +++++++ composer.json | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) 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 @@ +