From 8cce5b72478341bbea5c34f699064cd8ba64cf31 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 16 Dec 2024 13:14:38 +1300 Subject: [PATCH] MNT Fix unit test --- tests/php/Forms/DropdownFieldTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/php/Forms/DropdownFieldTest.php b/tests/php/Forms/DropdownFieldTest.php index 8af81e7af1b..321546be928 100644 --- a/tests/php/Forms/DropdownFieldTest.php +++ b/tests/php/Forms/DropdownFieldTest.php @@ -601,7 +601,7 @@ public function testEmptySourceDoesntBlockValidation() $this->assertTrue($field->validate()->isValid()); } - public function provideGetDefaultValue(): array + public static function provideGetDefaultValue(): array { return [ [ @@ -648,9 +648,7 @@ public function provideGetDefaultValue(): array ]; } - /** - * @dataProvider provideGetDefaultValue - */ + #[DataProvider('provideGetDefaultValue')] public function testGetDefaultValue(mixed $value, bool $hasEmptyDefault, mixed $expected): void { $field = new DropdownField('MyField', source: ['one' => 'one', 'two' => 'two', '3' => 'three']);