Skip to content

Commit 9348899

Browse files
committed
test: fix failed test, but can't fix it...
1 parent 78c6c66 commit 9348899

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/system/CLI/ConsoleTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
use CodeIgniter\Test\Mock\MockCodeIgniter;
2222

2323
/**
24+
* @runTestsInSeparateProcesses
25+
* @preserveGlobalState disabled
26+
*
2427
* @internal
2528
*/
2629
final class ConsoleTest extends CIUnitTestCase
@@ -81,6 +84,11 @@ public function testNoHeader()
8184

8285
public function testRun()
8386
{
87+
// The Console class is only used by spark.
88+
// But `CodeIgniter::runController()` cannot determine
89+
// that it is a Spark request without the constant SPARKED.
90+
define('SPARKED', true);
91+
8492
$request = new CLIRequest(config('App'));
8593
Services::injectMock('request', $request);
8694

0 commit comments

Comments
 (0)