Skip to content

Commit cbf815e

Browse files
committed
style: fix PHPUnit data provider naming/order per CS Fixer
1 parent d5bcfb4 commit cbf815e

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

‎tests/system/Models/GeneralModelTest.php‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ protected function tearDown(): void
4545
Time::setTestNow();
4646
}
4747

48-
/**
49-
* @return iterable<string, array{string, string}>
50-
*/
51-
public static function provideSubsecondDateFormats(): iterable
52-
{
53-
yield 'milliseconds' => ['Y-m-d H:i:s.v', '2024-07-09 09:13:34.654'];
54-
yield 'microseconds' => ['Y-m-d H:i:s.u', '2024-07-09 09:13:34.654321'];
55-
}
56-
5748
/**
5849
* Create an instance of Model for use in testing.
5950
*/
@@ -124,7 +115,7 @@ public function testSetAllowedFields(): void
124115
$this->assertSame($allowed2, $this->getPrivateProperty($model, 'allowedFields'));
125116
}
126117

127-
#[DataProvider('provideSubsecondDateFormats')]
118+
#[DataProvider('provideCurrentTimestampPreservesSubseconds')]
128119
public function testCurrentTimestampPreservesSubseconds(string $format, string $expected): void
129120
{
130121
Time::setTestNow('2024-07-09 09:13:34.654321');
@@ -136,6 +127,16 @@ public function testCurrentTimestampPreservesSubseconds(string $format, string $
136127
$this->assertSame($expected, $date());
137128
}
138129

130+
/**
131+
* @return iterable<string, array{string, string}>
132+
*/
133+
public static function provideCurrentTimestampPreservesSubseconds(): iterable
134+
{
135+
yield 'milliseconds' => ['Y-m-d H:i:s.v', '2024-07-09 09:13:34.654'];
136+
137+
yield 'microseconds' => ['Y-m-d H:i:s.u', '2024-07-09 09:13:34.654321'];
138+
}
139+
139140
public function testBuilderUsesModelTable(): void
140141
{
141142
$builder = $this->createModel(UserModel::class)->builder();

0 commit comments

Comments
 (0)