Skip to content

Commit c841fb8

Browse files
committed
Run rector
1 parent add2bbd commit c841fb8

File tree

320 files changed

+1182
-725
lines changed

Some content is hidden

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

320 files changed

+1182
-725
lines changed

tests/system/API/ResponseTraitTest.php

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

1414
namespace CodeIgniter\API;
1515

16+
use PHPUnit\Framework\Attributes\Group;
1617
use CodeIgniter\Config\Factories;
1718
use CodeIgniter\Format\FormatterInterface;
1819
use CodeIgniter\Format\JSONFormatter;
@@ -29,7 +30,7 @@
2930
/**
3031
* @internal
3132
*/
32-
#[\PHPUnit\Framework\Attributes\Group('Others')]
33+
#[Group('Others')]
3334
final class ResponseTraitTest extends CIUnitTestCase
3435
{
3536
private ?MockIncomingRequest $request = null;

tests/system/AutoReview/ComposerJsonTest.php

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

1414
namespace CodeIgniter\AutoReview;
1515

16+
use PHPUnit\Framework\Attributes\CoversNothing;
17+
use PHPUnit\Framework\Attributes\Group;
1618
use InvalidArgumentException;
1719
use JsonException;
1820
use PHPUnit\Framework\TestCase;
1921

2022
/**
2123
* @internal
2224
*/
23-
#[\PHPUnit\Framework\Attributes\CoversNothing]
24-
#[\PHPUnit\Framework\Attributes\Group('AutoReview')]
25+
#[CoversNothing]
26+
#[Group('AutoReview')]
2527
final class ComposerJsonTest extends TestCase
2628
{
2729
private array $devComposer;

tests/system/AutoReview/FrameworkCodeTest.php

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

1414
namespace CodeIgniter\AutoReview;
1515

16+
use PHPUnit\Framework\Attributes\DataProvider;
1617
use FilesystemIterator;
1718
use PHPUnit\Framework\Attributes\Group;
1819
use PHPUnit\Framework\TestCase;
@@ -44,7 +45,7 @@ final class FrameworkCodeTest extends TestCase
4445
/**
4546
* @param class-string $class
4647
*/
47-
#[\PHPUnit\Framework\Attributes\DataProvider('provideEachTestClassHasCorrectGroupAttributeName')]
48+
#[DataProvider('provideEachTestClassHasCorrectGroupAttributeName')]
4849
public function testEachTestClassHasCorrectGroupAttributeName(string $class): void
4950
{
5051
$reflection = new ReflectionClass($class);

tests/system/Autoloader/AutoloaderTest.php

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

1414
namespace CodeIgniter\Autoloader;
1515

16+
use PHPUnit\Framework\Attributes\Group;
17+
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
18+
use PHPUnit\Framework\Attributes\PreserveGlobalState;
1619
use App\Controllers\Home;
1720
use Closure;
1821
use CodeIgniter\Exceptions\ConfigException;
@@ -28,7 +31,7 @@
2831
/**
2932
* @internal
3033
*/
31-
#[\PHPUnit\Framework\Attributes\Group('Others')]
34+
#[Group('Others')]
3235
final class AutoloaderTest extends CIUnitTestCase
3336
{
3437
use ReflectionHelper;
@@ -389,8 +392,8 @@ public function testAutoloaderLoadsNonClassFiles(): void
389392
$loader->unregister();
390393
}
391394

392-
#[\PHPUnit\Framework\Attributes\RunInSeparateProcess]
393-
#[\PHPUnit\Framework\Attributes\PreserveGlobalState(false)]
395+
#[RunInSeparateProcess]
396+
#[PreserveGlobalState(false)]
394397
public function testLoadHelpers(): void
395398
{
396399
// Workaround for errors on PHPUnit 10 and PHP 8.3.

tests/system/Autoloader/FileLocatorCachedTest.php

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

1414
namespace CodeIgniter\Autoloader;
1515

16+
use PHPUnit\Framework\Attributes\Group;
1617
use CodeIgniter\Cache\FactoriesCache\FileVarExportHandler;
1718
use Config\Autoload;
1819
use Config\Modules;
1920

2021
/**
2122
* @internal
2223
*/
23-
#[\PHPUnit\Framework\Attributes\Group('Others')]
24+
#[Group('Others')]
2425
final class FileLocatorCachedTest extends FileLocatorTest
2526
{
2627
private FileVarExportHandler $handler;

tests/system/Autoloader/FileLocatorTest.php

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

1414
namespace CodeIgniter\Autoloader;
1515

16+
use PHPUnit\Framework\Attributes\Group;
1617
use CodeIgniter\HTTP\Header;
1718
use CodeIgniter\Test\CIUnitTestCase;
1819
use Config\Autoload;
@@ -23,7 +24,7 @@
2324
*
2425
* @no-final
2526
*/
26-
#[\PHPUnit\Framework\Attributes\Group('Others')]
27+
#[Group('Others')]
2728
class FileLocatorTest extends CIUnitTestCase
2829
{
2930
protected FileLocatorInterface $locator;

tests/system/CLI/CLITest.php

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

1414
namespace CodeIgniter\CLI;
1515

16+
use PHPUnit\Framework\Attributes\Group;
17+
use PHPUnit\Framework\Attributes\DataProvider;
1618
use CodeIgniter\Test\CIUnitTestCase;
1719
use CodeIgniter\Test\PhpStreamWrapper;
1820
use CodeIgniter\Test\StreamFilterTrait;
@@ -22,7 +24,7 @@
2224
/**
2325
* @internal
2426
*/
25-
#[\PHPUnit\Framework\Attributes\Group('Others')]
27+
#[Group('Others')]
2628
final class CLITest extends CIUnitTestCase
2729
{
2830
use StreamFilterTrait;
@@ -455,7 +457,7 @@ public function testWindow(): void
455457
* @param array $thead
456458
* @param array $expected
457459
*/
458-
#[\PHPUnit\Framework\Attributes\DataProvider('provideTable')]
460+
#[DataProvider('provideTable')]
459461
public function testTable($tbody, $thead, $expected): void
460462
{
461463
CLI::table($tbody, $thead);

tests/system/CLI/ConsoleTest.php

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

1414
namespace CodeIgniter\CLI;
1515

16+
use PHPUnit\Framework\Attributes\Group;
1617
use CodeIgniter\CodeIgniter;
1718
use CodeIgniter\Config\DotEnv;
1819
use CodeIgniter\Events\Events;
@@ -24,7 +25,7 @@
2425
/**
2526
* @internal
2627
*/
27-
#[\PHPUnit\Framework\Attributes\Group('Others')]
28+
#[Group('Others')]
2829
final class ConsoleTest extends CIUnitTestCase
2930
{
3031
use StreamFilterTrait;

tests/system/Cache/CacheFactoryTest.php

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

1414
namespace CodeIgniter\Cache;
1515

16+
use PHPUnit\Framework\Attributes\Group;
1617
use CodeIgniter\Cache\Exceptions\CacheException;
1718
use CodeIgniter\Cache\Handlers\DummyHandler;
1819
use CodeIgniter\Test\CIUnitTestCase;
@@ -21,7 +22,7 @@
2122
/**
2223
* @internal
2324
*/
24-
#[\PHPUnit\Framework\Attributes\Group('Others')]
25+
#[Group('Others')]
2526
final class CacheFactoryTest extends CIUnitTestCase
2627
{
2728
private static string $directory = 'CacheFactory';

tests/system/Cache/CacheMockTest.php

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

1414
namespace CodeIgniter\Cache;
1515

16+
use PHPUnit\Framework\Attributes\Group;
1617
use CodeIgniter\Cache\Handlers\BaseHandler;
1718
use CodeIgniter\Test\CIUnitTestCase;
1819
use CodeIgniter\Test\Mock\MockCache;
1920

2021
/**
2122
* @internal
2223
*/
23-
#[\PHPUnit\Framework\Attributes\Group('Others')]
24+
#[Group('Others')]
2425
final class CacheMockTest extends CIUnitTestCase
2526
{
2627
public function testMockReturnsMockCacheClass(): void

0 commit comments

Comments
 (0)