From 3ad691a035b7790daf49a242ffa78cb6022e99a4 Mon Sep 17 00:00:00 2001 From: Thomas Meschke Date: Mon, 18 Nov 2024 11:18:45 +0100 Subject: [PATCH] fix github actions --- tests/system/Files/FileTest.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/system/Files/FileTest.php b/tests/system/Files/FileTest.php index 464b625189c7..80a7ebfc6455 100644 --- a/tests/system/Files/FileTest.php +++ b/tests/system/Files/FileTest.php @@ -113,9 +113,7 @@ public function testGetSizeReturnsBytes(): void $this->assertSame($size, $file->getSizeByUnit('b')); } - /** - * @dataProvider provideGetSizeData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideGetSizeData')] public function testGetSizeBinary(FileSizeUnit $unit): void { $divider = 1024 ** $unit->value; @@ -131,9 +129,7 @@ public function testGetSizeBinaryBytes(): void $this->assertSame($size, $file->getSizeByUnitBinary(FileSizeUnit::B)); } - /** - * @dataProvider provideGetSizeData - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideGetSizeData')] public function testGetSizeMetric(FileSizeUnit $unit): void { $divider = 1000 ** $unit->value; @@ -173,22 +169,22 @@ public function testGetDestination(): void } /** - * @return Array> + * @return @return array> */ - public static function provideGetSizeData() + public static function provideGetSizeData(): iterable { return [ 'returns KB binary' => [ - FileSizeUnit::KB + FileSizeUnit::KB, ], 'returns MB binary' => [ - FileSizeUnit::KB + FileSizeUnit::MB, ], 'returns GB binary' => [ - FileSizeUnit::KB + FileSizeUnit::GB, ], 'returns TB binary' => [ - FileSizeUnit::KB + FileSizeUnit::TB, ], ]; }