Skip to content

Commit d47cd9e

Browse files
committed
Change visibility of setUp and tearDown to original protected
1 parent 9ee4abd commit d47cd9e

Some content is hidden

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

49 files changed

+55
-54
lines changed

admin/module/tests/_support/DatabaseTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ final class DatabaseTestCase extends CIUnitTestCase
4545
*/
4646
protected $namespace = 'Tests\Support';
4747

48-
public function setUp(): void
48+
protected function setUp(): void
4949
{
5050
parent::setUp();
5151

5252
// Extra code to run before each test
5353
}
5454

55-
public function tearDown(): void
55+
protected function tearDown(): void
5656
{
5757
parent::tearDown();
5858

admin/module/tests/_support/SessionTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class SessionTestCase extends CIUnitTestCase
1717
*/
1818
protected $session;
1919

20-
public function setUp(): void
20+
protected function setUp(): void
2121
{
2222
parent::setUp();
2323

admin/module/tests/database/ExampleDatabaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
final class ExampleDatabaseTest extends \Tests\Support\DatabaseTestCase
99
{
10-
public function setUp(): void
10+
protected function setUp(): void
1111
{
1212
parent::setUp();
1313

admin/module/tests/session/ExampleSessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
final class ExampleSessionTest extends \Tests\Support\SessionTestCase
77
{
8-
public function setUp(): void
8+
protected function setUp(): void
99
{
1010
parent::setUp();
1111
}

admin/module/tests/unit/ExampleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
final class ExampleTest extends \CodeIgniter\Test\CIUnitTestCase
77
{
8-
public function setUp(): void
8+
protected function setUp(): void
99
{
1010
parent::setUp();
1111
}

admin/starter/tests/_support/DatabaseTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ final class DatabaseTestCase extends CIUnitTestCase
4545
*/
4646
protected $namespace = 'Tests\Support';
4747

48-
public function setUp(): void
48+
protected function setUp(): void
4949
{
5050
parent::setUp();
5151

5252
// Extra code to run before each test
5353
}
5454

55-
public function tearDown(): void
55+
protected function tearDown(): void
5656
{
5757
parent::tearDown();
5858

admin/starter/tests/_support/SessionTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class SessionTestCase extends CIUnitTestCase
1717
*/
1818
protected $session;
1919

20-
public function setUp(): void
20+
protected function setUp(): void
2121
{
2222
parent::setUp();
2323

admin/starter/tests/database/ExampleDatabaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
final class ExampleDatabaseTest extends \Tests\Support\DatabaseTestCase
99
{
10-
public function setUp(): void
10+
protected function setUp(): void
1111
{
1212
parent::setUp();
1313

admin/starter/tests/session/ExampleSessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
final class ExampleSessionTest extends \Tests\Support\SessionTestCase
77
{
8-
public function setUp(): void
8+
protected function setUp(): void
99
{
1010
parent::setUp();
1111
}

admin/starter/tests/unit/HealthTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
final class HealthTest extends \CodeIgniter\Test\CIUnitTestCase
99
{
10-
public function setUp(): void
10+
protected function setUp(): void
1111
{
1212
parent::setUp();
1313
}

tests/system/CLI/CLITest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected function setUp(): void
2121
$this->stream_filter = stream_filter_append(STDOUT, 'CITestStreamFilter');
2222
}
2323

24-
public function tearDown(): void
24+
protected function tearDown(): void
2525
{
2626
stream_filter_remove($this->stream_filter);
2727
}

tests/system/CLI/CommandRunnerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function setUp(): void
4545
$this->streamFilter = stream_filter_append(STDERR, 'CITestStreamFilter');
4646
}
4747

48-
public function tearDown(): void
48+
protected function tearDown(): void
4949
{
5050
stream_filter_remove($this->streamFilter);
5151
}

tests/system/CLI/ConsoleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function setUp(): void
4242
$this->app = new MockCodeIgniter(new MockCLIConfig());
4343
}
4444

45-
public function tearDown(): void
45+
protected function tearDown(): void
4646
{
4747
stream_filter_remove($this->stream_filter);
4848
}

tests/system/Cache/CacheFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function setUp(): void
2626
$this->config->storePath .= self::$directory;
2727
}
2828

29-
public function tearDown(): void
29+
protected function tearDown(): void
3030
{
3131
if (is_dir($this->config->storePath)) {
3232
chmod($this->config->storePath, 0777);

tests/system/Cache/Handlers/FileHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function setUp(): void
4949
$this->fileHandler->initialize();
5050
}
5151

52-
public function tearDown(): void
52+
protected function tearDown(): void
5353
{
5454
parent::tearDown();
5555

tests/system/Cache/Handlers/MemcachedHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function setUp(): void
4040
$this->memcachedHandler->initialize();
4141
}
4242

43-
public function tearDown(): void
43+
protected function tearDown(): void
4444
{
4545
foreach (self::getKeyArray() as $key) {
4646
$this->memcachedHandler->delete($key);

tests/system/Cache/Handlers/PredisHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
$this->PredisHandler->initialize();
4040
}
4141

42-
public function tearDown(): void
42+
protected function tearDown(): void
4343
{
4444
foreach (self::getKeyArray() as $key) {
4545
$this->PredisHandler->delete($key);

tests/system/Cache/Handlers/RedisHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
$this->redisHandler->initialize();
4040
}
4141

42-
public function tearDown(): void
42+
protected function tearDown(): void
4343
{
4444
foreach (self::getKeyArray() as $key) {
4545
$this->redisHandler->delete($key);

tests/system/CodeIgniterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function setUp(): void
3737
$this->codeigniter = new MockCodeIgniter($config);
3838
}
3939

40-
public function tearDown(): void
40+
protected function tearDown(): void
4141
{
4242
parent::tearDown();
4343

tests/system/Commands/ClearCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function setUp(): void
2626
Services::injectMock('cache', CacheFactory::getHandler(config('Cache')));
2727
}
2828

29-
public function tearDown(): void
29+
protected function tearDown(): void
3030
{
3131
stream_filter_remove($this->streamFilter);
3232
}

tests/system/Commands/InfoCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function setUp(): void
2626
Services::injectMock('cache', CacheFactory::getHandler(config('Cache')));
2727
}
2828

29-
public function tearDown(): void
29+
protected function tearDown(): void
3030
{
3131
stream_filter_remove($this->streamFilter);
3232

tests/system/Commands/SessionsCommandsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function setUp(): void
2222
$this->streamFilter = stream_filter_append(STDERR, 'CITestStreamFilter');
2323
}
2424

25-
public function tearDown(): void
25+
protected function tearDown(): void
2626
{
2727
stream_filter_remove($this->streamFilter);
2828

tests/system/Config/ServicesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function setUp(): void
5252
$this->config = new App();
5353
}
5454

55-
public function tearDown(): void
55+
protected function tearDown(): void
5656
{
5757
$_SERVER = $this->original;
5858
Services::reset();

tests/system/Database/DatabaseTestCase/DatabaseTestCaseMigrationOnce1Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ final class DatabaseTestCaseMigrationOnce1Test extends CIUnitTestCase
4545
'Tests\Support\MigrationTestMigrations',
4646
];
4747

48-
public function setUp(): void
48+
protected function setUp(): void
4949
{
5050
Services::autoloader()->addNamespace('Tests\Support\MigrationTestMigrations', SUPPORTPATH . 'MigrationTestMigrations');
5151

tests/system/Database/DatabaseTestCase/DatabaseTestCaseMigrationOnce2Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ final class DatabaseTestCaseMigrationOnce2Test extends CIUnitTestCase
4444
'Tests\Support\MigrationTestMigrations',
4545
];
4646

47-
public function setUp(): void
47+
protected function setUp(): void
4848
{
4949
Services::autoloader()->addNamespace('Tests\Support\MigrationTestMigrations', SUPPORTPATH . 'MigrationTestMigrations');
5050

tests/system/Database/DatabaseTestCaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ final class DatabaseTestCaseTest extends CIUnitTestCase
4949
'Tests\Support\MigrationTestMigrations',
5050
];
5151

52-
public function setUp(): void
52+
protected function setUp(): void
5353
{
5454
if (! self::$loaded) {
5555
Services::autoloader()->addNamespace('Tests\Support\MigrationTestMigrations', SUPPORTPATH . 'MigrationTestMigrations');

tests/system/Database/Live/DEBugTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testDBDebugFalse()
3030
$this->assertFalse($result);
3131
}
3232

33-
public function tearDown(): void
33+
protected function tearDown(): void
3434
{
3535
$this->setPrivateProperty($this->db, 'DBDebug', true);
3636
parent::tearDown();

tests/system/Database/Live/GetNumRowsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class GetNumRowsTest extends CIUnitTestCase
2222
*
2323
* @see \CodeIgniter\Test\CIDatabaseTestCase::setUp()
2424
*/
25-
public function setUp(): void
25+
protected function setUp(): void
2626
{
2727
parent::setUp();
2828
}
@@ -33,7 +33,7 @@ public function setUp(): void
3333
*
3434
* @see \CodeIgniter\Test\CIDatabaseTestCase::tearDown()
3535
*/
36-
public function tearDown(): void
36+
protected function tearDown(): void
3737
{
3838
parent::tearDown();
3939
}

tests/system/Database/Live/PretendTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class PretendTest extends CIUnitTestCase
1515
{
1616
use DatabaseTestTrait;
1717

18-
public function tearDown(): void
18+
protected function tearDown(): void
1919
{
2020
// We share `$this->db` in testing, so we need to restore the state.
2121
$this->db->pretend(false);

tests/system/Database/Live/SQLite/AlterTableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class AlterTableTest extends CIUnitTestCase
4040
*/
4141
protected $forge;
4242

43-
public function setUp(): void
43+
protected function setUp(): void
4444
{
4545
parent::setUp();
4646

tests/system/Database/Migrations/MigrationRunnerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class MigrationRunnerTest extends CIUnitTestCase
2929
protected $start;
3030
protected $config;
3131

32-
public function setUp(): void
32+
protected function setUp(): void
3333
{
3434
parent::setUp();
3535

tests/system/Database/Migrations/MigrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class MigrationTest extends CIUnitTestCase
1313
{
1414
use DatabaseTestTrait;
1515

16-
public function setUp(): void
16+
protected function setUp(): void
1717
{
1818
parent::setUp();
1919
}

tests/system/Files/FileWithVfsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function setUp(): void
3232
$this->file = new File($this->start . 'able/apple.php');
3333
}
3434

35-
public function tearDown(): void
35+
protected function tearDown(): void
3636
{
3737
parent::tearDown();
3838

tests/system/HTTP/DownloadResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
final class DownloadResponseTest extends CIUnitTestCase
1515
{
16-
public function tearDown(): void
16+
protected function tearDown(): void
1717
{
1818
if (isset($_SERVER['HTTP_USER_AGENT'])) {
1919
unset($_SERVER['HTTP_USER_AGENT']);

tests/system/HTTP/Files/FileMovingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected function setUp(): void
2828
$_FILES = [];
2929
}
3030

31-
public function tearDown(): void
31+
protected function tearDown(): void
3232
{
3333
parent::tearDown();
3434
$this->root = null;

tests/system/HTTP/MessageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function setUp(): void
2525

2626
//--------------------------------------------------------------------
2727

28-
public function tearDown(): void
28+
protected function tearDown(): void
2929
{
3030
$this->message = null;
3131
unset($this->message);

tests/system/HTTP/NegotiateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp(): void
3333

3434
//--------------------------------------------------------------------
3535

36-
public function tearDown(): void
36+
protected function tearDown(): void
3737
{
3838
$this->request = $this->negotiate = null;
3939
unset($this->request, $this->negotiate);

tests/system/HTTP/ResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function setUp(): void
2525
$this->server = $_SERVER;
2626
}
2727

28-
public function tearDown(): void
28+
protected function tearDown(): void
2929
{
3030
$_SERVER = $this->server;
3131
Factories::reset('config');

tests/system/HTTP/URITest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function setUp(): void
2222

2323
//--------------------------------------------------------------------
2424

25-
public function tearDown(): void
25+
protected function tearDown(): void
2626
{
2727
Factories::reset('config');
2828
}

tests/system/Helpers/URLHelper/CurrentUrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function setUp(): void
4949
$_SERVER['SCRIPT_NAME'] = '/index.php';
5050
}
5151

52-
public function tearDown(): void
52+
protected function tearDown(): void
5353
{
5454
parent::tearDown();
5555

tests/system/Helpers/URLHelper/MiscUrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function setUp(): void
4141
Factories::injectMock('config', 'App', $this->config);
4242
}
4343

44-
public function tearDown(): void
44+
protected function tearDown(): void
4545
{
4646
parent::tearDown();
4747

0 commit comments

Comments
 (0)