Skip to content

Commit 7e4e56c

Browse files
authored
Test classes should be marked as final and internal
1 parent 625be30 commit 7e4e56c

File tree

223 files changed

+804
-197
lines changed

Some content is hidden

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

223 files changed

+804
-197
lines changed

admin/module/tests/_support/DatabaseTestCase.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use CodeIgniter\Test\CIUnitTestCase;
66
use CodeIgniter\Test\DatabaseTestTrait;
77

8-
class DatabaseTestCase extends CIUnitTestCase
8+
/**
9+
* @internal
10+
*/
11+
final class DatabaseTestCase extends CIUnitTestCase
912
{
1013
use DatabaseTestTrait;
1114

admin/module/tests/_support/SessionTestCase.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
use CodeIgniter\Test\CIUnitTestCase;
88
use CodeIgniter\Test\Mock\MockSession;
99

10-
class SessionTestCase extends CIUnitTestCase
10+
/**
11+
* @internal
12+
*/
13+
final class SessionTestCase extends CIUnitTestCase
1114
{
1215
/**
1316
* @var SessionInterface

admin/module/tests/database/ExampleDatabaseTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
use Tests\Support\Models\ExampleModel;
44

5-
class ExampleDatabaseTest extends \Tests\Support\DatabaseTestCase
5+
/**
6+
* @internal
7+
*/
8+
final class ExampleDatabaseTest extends \Tests\Support\DatabaseTestCase
69
{
710
public function setUp(): void
811
{

admin/module/tests/session/ExampleSessionTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

3-
class ExampleSessionTest extends \Tests\Support\SessionTestCase
3+
/**
4+
* @internal
5+
*/
6+
final class ExampleSessionTest extends \Tests\Support\SessionTestCase
47
{
58
public function setUp(): void
69
{

admin/module/tests/unit/ExampleTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

3-
class ExampleTest extends \CodeIgniter\Test\CIUnitTestCase
3+
/**
4+
* @internal
5+
*/
6+
final class ExampleTest extends \CodeIgniter\Test\CIUnitTestCase
47
{
58
public function setUp(): void
69
{

admin/starter/tests/_support/DatabaseTestCase.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use CodeIgniter\Test\CIUnitTestCase;
66
use CodeIgniter\Test\DatabaseTestTrait;
77

8-
class DatabaseTestCase extends CIUnitTestCase
8+
/**
9+
* @internal
10+
*/
11+
final class DatabaseTestCase extends CIUnitTestCase
912
{
1013
use DatabaseTestTrait;
1114

admin/starter/tests/_support/SessionTestCase.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
use CodeIgniter\Test\CIUnitTestCase;
88
use CodeIgniter\Test\Mock\MockSession;
99

10-
class SessionTestCase extends CIUnitTestCase
10+
/**
11+
* @internal
12+
*/
13+
final class SessionTestCase extends CIUnitTestCase
1114
{
1215
/**
1316
* @var SessionInterface

admin/starter/tests/database/ExampleDatabaseTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
use Tests\Support\Models\ExampleModel;
44

5-
class ExampleDatabaseTest extends \Tests\Support\DatabaseTestCase
5+
/**
6+
* @internal
7+
*/
8+
final class ExampleDatabaseTest extends \Tests\Support\DatabaseTestCase
69
{
710
public function setUp(): void
811
{

admin/starter/tests/session/ExampleSessionTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

3-
class ExampleSessionTest extends \Tests\Support\SessionTestCase
3+
/**
4+
* @internal
5+
*/
6+
final class ExampleSessionTest extends \Tests\Support\SessionTestCase
47
{
58
public function setUp(): void
69
{

admin/starter/tests/unit/HealthTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
use Config\Services;
44

5-
class HealthTest extends \CodeIgniter\Test\CIUnitTestCase
5+
/**
6+
* @internal
7+
*/
8+
final class HealthTest extends \CodeIgniter\Test\CIUnitTestCase
69
{
710
public function setUp(): void
811
{

system/Test/FeatureTestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@
2929
* Provides a base class with the trait for doing full HTTP testing
3030
* against your application.
3131
*
32+
* @no-final
33+
*
3234
* @deprecated Use FeatureTestTrait instead
3335
*
3436
* @codeCoverageIgnore
37+
*
38+
* @internal
3539
*/
3640
class FeatureTestCase extends CIUnitTestCase
3741
{

system/Test/TestResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
*
2424
* Consolidated response processing
2525
* for test results.
26+
*
27+
* @no-final
28+
*
29+
* @internal
2630
*/
2731
class TestResponse extends TestCase
2832
{

tests/system/API/ResponseTraitTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
use Config\App;
1313
use stdClass;
1414

15-
class ResponseTraitTest extends CIUnitTestCase
15+
/**
16+
* @internal
17+
*/
18+
final class ResponseTraitTest extends CIUnitTestCase
1619
{
1720
protected $request;
1821
protected $response;

tests/system/Autoloader/AutoloaderTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
use Config\Services;
99
use UnnamespacedClass;
1010

11-
class AutoloaderTest extends CIUnitTestCase
11+
/**
12+
* @internal
13+
*/
14+
final class AutoloaderTest extends CIUnitTestCase
1215
{
1316
/**
1417
* @var Autoloader

tests/system/Autoloader/FileLocatorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
use Config\Autoload;
77
use Config\Modules;
88

9-
class FileLocatorTest extends CIUnitTestCase
9+
/**
10+
* @internal
11+
*/
12+
final class FileLocatorTest extends CIUnitTestCase
1013
{
1114
/**
1215
* @var FileLocator

tests/system/CLI/CLITest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use CodeIgniter\Test\Filters\CITestStreamFilter;
77
use ReflectionProperty;
88

9+
/**
10+
* @internal
11+
*/
912
final class CLITest extends CIUnitTestCase
1013
{
1114
private $stream_filter;

tests/system/CLI/CommandRunnerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use CodeIgniter\Test\Filters\CITestStreamFilter;
88
use Config\Services;
99

10+
/**
11+
* @internal
12+
*/
1013
final class CommandRunnerTest extends CIUnitTestCase
1114
{
1215
/**

tests/system/CLI/ConsoleTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
use CodeIgniter\Test\Mock\MockCLIConfig;
1111
use CodeIgniter\Test\Mock\MockCodeIgniter;
1212

13-
class ConsoleTest extends CIUnitTestCase
13+
/**
14+
* @internal
15+
*/
16+
final class ConsoleTest extends CIUnitTestCase
1417
{
1518
private $stream_filter;
1619

tests/system/Cache/CacheFactoryTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
use CodeIgniter\Test\CIUnitTestCase;
77
use Config\Cache;
88

9-
class CacheFactoryTest extends CIUnitTestCase
9+
/**
10+
* @internal
11+
*/
12+
final class CacheFactoryTest extends CIUnitTestCase
1013
{
1114
private static $directory = 'CacheFactory';
1215
private $cacheFactory;

tests/system/Cache/Handlers/BaseHandlerTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
use stdClass;
77
use Tests\Support\Cache\RestrictiveHandler;
88

9-
class BaseHandlerTest extends CIUnitTestCase
9+
/**
10+
* @internal
11+
*/
12+
final class BaseHandlerTest extends CIUnitTestCase
1013
{
1114
/**
1215
* @dataProvider invalidTypeProvider

tests/system/Cache/Handlers/DummyHandlerTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
use CodeIgniter\Test\CIUnitTestCase;
66

7-
class DummyHandlerTest extends CIUnitTestCase
7+
/**
8+
* @internal
9+
*/
10+
final class DummyHandlerTest extends CIUnitTestCase
811
{
912
private $dummyHandler;
1013

tests/system/Cache/Handlers/FileHandlerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use CodeIgniter\Test\CIUnitTestCase;
77
use Config\Cache;
88

9+
/**
10+
* @internal
11+
*/
912
final class FileHandlerTest extends CIUnitTestCase
1013
{
1114
private static $directory = 'FileHandler';

tests/system/Cache/Handlers/MemcachedHandlerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use Config\Cache;
88
use Exception;
99

10+
/**
11+
* @internal
12+
*/
1013
final class MemcachedHandlerTest extends CIUnitTestCase
1114
{
1215
private $memcachedHandler;

tests/system/Cache/Handlers/PredisHandlerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use CodeIgniter\Test\CIUnitTestCase;
77
use Config\Cache;
88

9+
/**
10+
* @internal
11+
*/
912
final class PredisHandlerTest extends CIUnitTestCase
1013
{
1114
private $PredisHandler;

tests/system/Cache/Handlers/RedisHandlerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use CodeIgniter\Test\CIUnitTestCase;
77
use Config\Cache;
88

9+
/**
10+
* @internal
11+
*/
912
final class RedisHandlerTest extends CIUnitTestCase
1013
{
1114
private $redisHandler;

tests/system/CodeIgniterTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111

1212
/**
1313
* @backupGlobals enabled
14+
*
15+
* @internal
1416
*/
15-
class CodeIgniterTest extends CIUnitTestCase
17+
final class CodeIgniterTest extends CIUnitTestCase
1618
{
1719
/**
1820
* @var CodeIgniter

tests/system/Commands/BaseCommandTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
use Config\Services;
88
use Tests\Support\Commands\AppInfo;
99

10-
class BaseCommandTest extends CIUnitTestCase
10+
/**
11+
* @internal
12+
*/
13+
final class BaseCommandTest extends CIUnitTestCase
1114
{
1215
protected $logger;
1316
protected $runner;

tests/system/Commands/ClearCacheTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
use CodeIgniter\Test\Filters\CITestStreamFilter;
88
use Config\Services;
99

10-
class ClearCacheTest extends CIUnitTestCase
10+
/**
11+
* @internal
12+
*/
13+
final class ClearCacheTest extends CIUnitTestCase
1114
{
1215
protected $streamFilter;
1316

tests/system/Commands/ClearDebugbarTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use CodeIgniter\Test\CIUnitTestCase;
66
use CodeIgniter\Test\Filters\CITestStreamFilter;
77

8-
class ClearDebugbarTest extends CIUnitTestCase
8+
/**
9+
* @internal
10+
*/
11+
final class ClearDebugbarTest extends CIUnitTestCase
912
{
1013
protected $streamFilter;
1114
protected $time;

tests/system/Commands/ClearLogsTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use CodeIgniter\Test\CIUnitTestCase;
66
use CodeIgniter\Test\Filters\CITestStreamFilter;
77

8-
class ClearLogsTest extends CIUnitTestCase
8+
/**
9+
* @internal
10+
*/
11+
final class ClearLogsTest extends CIUnitTestCase
912
{
1013
protected $streamFilter;
1114
protected $date;

tests/system/Commands/CommandTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
use Config\Services;
88
use Tests\Support\Commands\ParamsReveal;
99

10-
class CommandTest extends CIUnitTestCase
10+
/**
11+
* @internal
12+
*/
13+
final class CommandTest extends CIUnitTestCase
1114
{
1215
private $streamFilter;
1316
protected $logger;

tests/system/Commands/ConfigGeneratorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use CodeIgniter\Test\CIUnitTestCase;
66
use CodeIgniter\Test\Filters\CITestStreamFilter;
77

8-
class ConfigGeneratorTest extends CIUnitTestCase
8+
/**
9+
* @internal
10+
*/
11+
final class ConfigGeneratorTest extends CIUnitTestCase
912
{
1013
protected $streamFilter;
1114

tests/system/Commands/ConfigurableSortImportsTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use CodeIgniter\Test\CIUnitTestCase;
66
use CodeIgniter\Test\Filters\CITestStreamFilter;
77

8-
class ConfigurableSortImportsTest extends CIUnitTestCase
8+
/**
9+
* @internal
10+
*/
11+
final class ConfigurableSortImportsTest extends CIUnitTestCase
912
{
1013
protected $streamFilter;
1114

tests/system/Commands/ControllerGeneratorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
use CodeIgniter\Test\CIUnitTestCase;
66
use CodeIgniter\Test\Filters\CITestStreamFilter;
77

8-
class ControllerGeneratorTest extends CIUnitTestCase
8+
/**
9+
* @internal
10+
*/
11+
final class ControllerGeneratorTest extends CIUnitTestCase
912
{
1013
protected $streamFilter;
1114

0 commit comments

Comments
 (0)