Skip to content

Commit b1945a2

Browse files
authored
Merge pull request #5259 from paulbalandan/reset-services
Replace explicit calls to `Services::reset()` in tests
2 parents 1d0b0d8 + ec303bf commit b1945a2

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

tests/system/CodeIgniterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ final class CodeIgniterTest extends CIUnitTestCase
3636
protected function setUp(): void
3737
{
3838
parent::setUp();
39-
Services::reset();
39+
$this->resetServices();
4040

4141
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
4242

tests/system/CommonHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ final class CommonHelperTest extends CIUnitTestCase
3232

3333
protected function setUp(): void
3434
{
35-
Services::reset();
35+
$this->resetServices();
3636
parent::setUp();
3737
$this->cleanUpDummyHelpers();
3838
}
@@ -41,7 +41,7 @@ protected function tearDown(): void
4141
{
4242
parent::tearDown();
4343
$this->cleanUpDummyHelpers();
44-
Services::reset();
44+
$this->resetServices();
4545
}
4646

4747
private function createDummyHelpers(): void

tests/system/Config/ServicesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function setUp(): void
6464
protected function tearDown(): void
6565
{
6666
$_SERVER = $this->original;
67-
Services::reset();
67+
$this->resetServices();
6868
}
6969

7070
public function testCanReplaceFrameworkServices()

tests/system/Filters/FiltersTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class FiltersTest extends CIUnitTestCase
4040
protected function setUp(): void
4141
{
4242
parent::setUp();
43-
Services::reset();
43+
$this->resetServices();
4444

4545
$defaults = [
4646
'Config' => APPPATH . 'Config',

tests/system/HTTP/CURLRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function setUp(): void
3232
{
3333
parent::setUp();
3434

35-
Services::reset();
35+
$this->resetServices();
3636
$this->request = $this->getRequest();
3737
}
3838

tests/system/HTTP/URITest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ public function testSetBadSegmentSilent()
861861

862862
public function testBasedNoIndex()
863863
{
864-
Services::reset();
864+
$this->resetServices();
865865

866866
$_SERVER['HTTP_HOST'] = 'example.com';
867867
$_SERVER['REQUEST_URI'] = '/ci/v4/controller/method';
@@ -888,7 +888,7 @@ public function testBasedNoIndex()
888888

889889
public function testBasedWithIndex()
890890
{
891-
Services::reset();
891+
$this->resetServices();
892892

893893
$_SERVER['HTTP_HOST'] = 'example.com';
894894
$_SERVER['REQUEST_URI'] = '/ci/v4/index.php/controller/method';
@@ -915,7 +915,7 @@ public function testBasedWithIndex()
915915

916916
public function testForceGlobalSecureRequests()
917917
{
918-
Services::reset();
918+
$this->resetServices();
919919

920920
$_SERVER['HTTP_HOST'] = 'example.com';
921921
$_SERVER['REQUEST_URI'] = '/ci/v4/controller/method';

tests/system/RESTful/ResourceControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function setUp(): void
5454
{
5555
parent::setUp();
5656

57-
Services::reset();
57+
$this->resetServices();
5858

5959
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
6060

tests/system/RESTful/ResourcePresenterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function setUp(): void
4848
{
4949
parent::setUp();
5050

51-
Services::reset();
51+
$this->resetServices();
5252

5353
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
5454

0 commit comments

Comments
 (0)