Skip to content

Commit b84d90a

Browse files
committed
test: fix failed test
1 parent e8c91f3 commit b84d90a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/system/CLI/ConsoleTest.php

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

2323
/**
24+
* @runTestsInSeparateProcess
25+
*
2426
* @internal
2527
*/
2628
final class ConsoleTest extends CIUnitTestCase
@@ -81,6 +83,11 @@ public function testNoHeader()
8183

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

0 commit comments

Comments
 (0)