Skip to content

Commit 9a583f2

Browse files
committed
update tests
1 parent 670bbe5 commit 9a583f2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/system/Helpers/FormHelperTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Config\DocTypes;
2222
use Config\Filters;
2323
use Config\Services;
24+
use PHPUnit\Framework\Attributes\BackupGlobals;
2425
use PHPUnit\Framework\Attributes\Group;
2526
use PHPUnit\Framework\Attributes\PreserveGlobalState;
2627
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
@@ -29,6 +30,7 @@
2930
/**
3031
* @internal
3132
*/
33+
#[BackupGlobals(true)]
3234
#[Group('SeparateProcess')]
3335
final class FormHelperTest extends CIUnitTestCase
3436
{
@@ -39,6 +41,8 @@ protected function setUp(): void
3941

4042
parent::setUp();
4143

44+
$_POST = $_GET = [];
45+
4246
CodeIgniterServices::injectMock('superglobals', new Superglobals());
4347

4448
helper('form');

tests/system/Test/FeatureTestTraitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222
use Config\App;
2323
use Config\Feature;
2424
use Config\Routing;
25+
use PHPUnit\Framework\Attributes\BackupGlobals;
2526
use PHPUnit\Framework\Attributes\DataProvider;
2627
use PHPUnit\Framework\Attributes\Group;
2728

2829
/**
2930
* @internal
3031
*/
32+
#[BackupGlobals(true)]
3133
#[Group('DatabaseLive')]
3234
final class FeatureTestTraitTest extends CIUnitTestCase
3335
{

0 commit comments

Comments
 (0)