Skip to content

Commit 152a7a1

Browse files
authored
Merge pull request #7767 from paulbalandan/phpunit-data-provider-static
Enable `php_unit_data_provider_static`
2 parents dd7a139 + 20f2700 commit 152a7a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+130
-127
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
'prefix' => 'provide',
4949
'suffix' => '',
5050
],
51+
'php_unit_data_provider_static' => true,
5152
'php_unit_data_provider_return_type' => true,
5253
'no_extra_blank_lines' => [
5354
'tokens' => [

.php-cs-fixer.no-header.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
'prefix' => 'provide',
3535
'suffix' => '',
3636
],
37+
'php_unit_data_provider_static' => true,
3738
'php_unit_data_provider_return_type' => true,
3839
'no_extra_blank_lines' => [
3940
'tokens' => [

.php-cs-fixer.user-guide.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
'use',
5454
],
5555
],
56-
'php_unit_data_provider_name' => [
56+
'php_unit_data_provider_static' => true,
57+
'php_unit_data_provider_name' => [
5758
'prefix' => 'provide',
5859
'suffix' => '',
5960
],

tests/system/CLI/CLITest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public function testTable($tbody, $thead, $expected): void
463463
$this->assertSame($this->getStreamFilterBuffer(), $expected);
464464
}
465465

466-
public function provideTable(): iterable
466+
public static function provideTable(): iterable
467467
{
468468
$head = [
469469
'ID',

tests/system/Cache/Handlers/BaseHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testValidateKeyInvalidType($input): void
3535
BaseHandler::validateKey($input);
3636
}
3737

38-
public function provideValidateKeyInvalidType(): iterable
38+
public static function provideValidateKeyInvalidType(): iterable
3939
{
4040
return [
4141
[true],

tests/system/Cache/Handlers/FileHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function testSaveMode(int $int, string $string): void
296296
$this->assertSame($string, $mode);
297297
}
298298

299-
public function provideSaveMode(): iterable
299+
public static function provideSaveMode(): iterable
300300
{
301301
return [
302302
[

tests/system/CodeIgniterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ public function testPageCacheWithCacheQueryString($cacheQueryStringValue, int $e
789789
CITestStreamFilter::removeErrorFilter();
790790
}
791791

792-
public function providePageCacheWithCacheQueryString(): iterable
792+
public static function providePageCacheWithCacheQueryString(): iterable
793793
{
794794
$testingUrls = [
795795
'test', // URL #1

tests/system/Commands/CommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function testCommandParsesArgsCorrectly(string $input, array $expected):
138138
$this->assertSame($expected, ParamsReveal::$args);
139139
}
140140

141-
public function provideCommandParsesArgsCorrectly(): iterable
141+
public static function provideCommandParsesArgsCorrectly(): iterable
142142
{
143143
return [
144144
[

tests/system/Commands/Utilities/Routes/SampleURIGeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testGet(string $routeKey, string $expected): void
3333
$this->assertSame($expected, $uri);
3434
}
3535

36-
public function provideGet(): iterable
36+
public static function provideGet(): iterable
3737
{
3838
yield from [
3939
'root' => ['/', '/'],

tests/system/CommonFunctionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public function testCleanPathActuallyCleaningThePaths($input, $expected): void
604604
$this->assertSame($expected, clean_path($input));
605605
}
606606

607-
public function provideCleanPathActuallyCleaningThePaths(): iterable
607+
public static function provideCleanPathActuallyCleaningThePaths(): iterable
608608
{
609609
$ds = DIRECTORY_SEPARATOR;
610610

0 commit comments

Comments
 (0)