Skip to content

Commit 2530b23

Browse files
authored
Merge pull request #8856 from kenjis/fix-cs-tests
test: fix coding style and test-coding-standards.yml
2 parents 299bb8b + 9a7cae8 commit 2530b23

File tree

314 files changed

+462
-456
lines changed

Some content is hidden

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

314 files changed

+462
-456
lines changed

.github/workflows/test-coding-standards.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
matrix:
3030
php-version:
3131
- '8.1'
32-
- '8.2'
32+
- '8.3'
3333

3434
steps:
3535
- name: Checkout
@@ -60,8 +60,11 @@ jobs:
6060
- name: Run lint on `app/`, `admin/`, `public/`
6161
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.no-header.php --using-cache=no --diff
6262

63-
- name: Run lint on `system/`, `tests`, `utils/`, and root PHP files
63+
- name: Run lint on `system/`, `utils/`, and root PHP files
6464
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff
6565

66+
- name: Run lint on `tests`
67+
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.tests.php --using-cache=no --diff
68+
6669
- name: Run lint on `user_guide_src/source/`
6770
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.user-guide.php --using-cache=no --diff

tests/system/API/ResponseTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
namespace CodeIgniter\API;
1515

16-
use PHPUnit\Framework\Attributes\Group;
1716
use CodeIgniter\Config\Factories;
1817
use CodeIgniter\Format\FormatterInterface;
1918
use CodeIgniter\Format\JSONFormatter;
@@ -25,6 +24,7 @@
2524
use CodeIgniter\Test\Mock\MockResponse;
2625
use Config\App;
2726
use Config\Cookie;
27+
use PHPUnit\Framework\Attributes\Group;
2828
use stdClass;
2929

3030
/**

tests/system/AutoReview/ComposerJsonTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
namespace CodeIgniter\AutoReview;
1515

16-
use PHPUnit\Framework\Attributes\CoversNothing;
17-
use PHPUnit\Framework\Attributes\Group;
1816
use InvalidArgumentException;
1917
use JsonException;
18+
use PHPUnit\Framework\Attributes\CoversNothing;
19+
use PHPUnit\Framework\Attributes\Group;
2020
use PHPUnit\Framework\TestCase;
2121

2222
/**

tests/system/AutoReview/FrameworkCodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace CodeIgniter\AutoReview;
1515

16-
use PHPUnit\Framework\Attributes\DataProvider;
1716
use FilesystemIterator;
17+
use PHPUnit\Framework\Attributes\DataProvider;
1818
use PHPUnit\Framework\Attributes\Group;
1919
use PHPUnit\Framework\TestCase;
2020
use RecursiveDirectoryIterator;

tests/system/Autoloader/AutoloaderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
namespace CodeIgniter\Autoloader;
1515

16-
use PHPUnit\Framework\Attributes\Group;
17-
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
18-
use PHPUnit\Framework\Attributes\PreserveGlobalState;
1916
use App\Controllers\Home;
2017
use Closure;
2118
use CodeIgniter\Exceptions\ConfigException;
@@ -25,6 +22,9 @@
2522
use Config\Modules;
2623
use Config\Services;
2724
use InvalidArgumentException;
25+
use PHPUnit\Framework\Attributes\Group;
26+
use PHPUnit\Framework\Attributes\PreserveGlobalState;
27+
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
2828
use RuntimeException;
2929
use UnnamespacedClass;
3030

tests/system/Autoloader/FileLocatorCachedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
namespace CodeIgniter\Autoloader;
1515

16-
use PHPUnit\Framework\Attributes\Group;
1716
use CodeIgniter\Cache\FactoriesCache\FileVarExportHandler;
1817
use Config\Autoload;
1918
use Config\Modules;
19+
use PHPUnit\Framework\Attributes\Group;
2020

2121
/**
2222
* @internal

tests/system/Autoloader/FileLocatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
namespace CodeIgniter\Autoloader;
1515

16-
use PHPUnit\Framework\Attributes\Group;
1716
use CodeIgniter\HTTP\Header;
1817
use CodeIgniter\Test\CIUnitTestCase;
1918
use Config\Autoload;
2019
use Config\Modules;
20+
use PHPUnit\Framework\Attributes\Group;
2121

2222
/**
2323
* @internal

tests/system/CLI/CLITest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
namespace CodeIgniter\CLI;
1515

16-
use PHPUnit\Framework\Attributes\Group;
17-
use PHPUnit\Framework\Attributes\DataProvider;
1816
use CodeIgniter\Test\CIUnitTestCase;
1917
use CodeIgniter\Test\PhpStreamWrapper;
2018
use CodeIgniter\Test\StreamFilterTrait;
19+
use PHPUnit\Framework\Attributes\DataProvider;
20+
use PHPUnit\Framework\Attributes\Group;
2121
use ReflectionProperty;
2222
use RuntimeException;
2323

tests/system/CLI/ConsoleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414
namespace CodeIgniter\CLI;
1515

16-
use PHPUnit\Framework\Attributes\Group;
1716
use CodeIgniter\CodeIgniter;
1817
use CodeIgniter\Config\DotEnv;
1918
use CodeIgniter\Events\Events;
2019
use CodeIgniter\Test\CIUnitTestCase;
2120
use CodeIgniter\Test\Mock\MockCLIConfig;
2221
use CodeIgniter\Test\Mock\MockCodeIgniter;
2322
use CodeIgniter\Test\StreamFilterTrait;
23+
use PHPUnit\Framework\Attributes\Group;
2424

2525
/**
2626
* @internal

tests/system/Cache/CacheFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
namespace CodeIgniter\Cache;
1515

16-
use PHPUnit\Framework\Attributes\Group;
1716
use CodeIgniter\Cache\Exceptions\CacheException;
1817
use CodeIgniter\Cache\Handlers\DummyHandler;
1918
use CodeIgniter\Test\CIUnitTestCase;
2019
use Config\Cache;
20+
use PHPUnit\Framework\Attributes\Group;
2121

2222
/**
2323
* @internal

0 commit comments

Comments
 (0)