Skip to content

Commit a9862ec

Browse files
committed
fix failing jobs
1 parent 3ad691a commit a9862ec

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

tests/system/Files/FileTest.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use CodeIgniter\Files\Exceptions\FileNotFoundException;
1717
use CodeIgniter\Test\CIUnitTestCase;
18+
use PHPUnit\Framework\Attributes\DataProvider;
1819
use PHPUnit\Framework\Attributes\Group;
1920
use ZipArchive;
2021

@@ -113,12 +114,12 @@ public function testGetSizeReturnsBytes(): void
113114
$this->assertSame($size, $file->getSizeByUnit('b'));
114115
}
115116

116-
#[\PHPUnit\Framework\Attributes\DataProvider('provideGetSizeData')]
117+
#[DataProvider('provideGetSizeData')]
117118
public function testGetSizeBinary(FileSizeUnit $unit): void
118119
{
119120
$divider = 1024 ** $unit->value;
120-
$file = new File(SYSTEMPATH . 'Common.php');
121-
$size = number_format(filesize(SYSTEMPATH . 'Common.php') / $divider, 3);
121+
$file = new File(SYSTEMPATH . 'Common.php');
122+
$size = number_format(filesize(SYSTEMPATH . 'Common.php') / $divider, 3);
122123
$this->assertSame($size, $file->getSizeByUnitBinary($unit));
123124
}
124125

@@ -129,12 +130,12 @@ public function testGetSizeBinaryBytes(): void
129130
$this->assertSame($size, $file->getSizeByUnitBinary(FileSizeUnit::B));
130131
}
131132

132-
#[\PHPUnit\Framework\Attributes\DataProvider('provideGetSizeData')]
133+
#[DataProvider('provideGetSizeData')]
133134
public function testGetSizeMetric(FileSizeUnit $unit): void
134135
{
135136
$divider = 1000 ** $unit->value;
136-
$file = new File(SYSTEMPATH . 'Common.php');
137-
$size = number_format(filesize(SYSTEMPATH . 'Common.php') / $divider, 3);
137+
$file = new File(SYSTEMPATH . 'Common.php');
138+
$size = number_format(filesize(SYSTEMPATH . 'Common.php') / $divider, 3);
138139
$this->assertSame($size, $file->getSizeByUnitMetric($unit));
139140
}
140141

@@ -169,9 +170,9 @@ public function testGetDestination(): void
169170
}
170171

171172
/**
172-
* @return @return array<string, list<int>>
173+
* @return array<string, list<int>>
173174
*/
174-
public static function provideGetSizeData(): iterable
175+
public static function provideGetSizeData()
175176
{
176177
return [
177178
'returns KB binary' => [

0 commit comments

Comments
 (0)