Skip to content

Commit ed22aa5

Browse files
committed
Revert "Merge pull request #5653 from kenjis/refactor-CLI-Incomming-Request"
This reverts commit 93b8bca, reversing changes made to 048d997.
1 parent 48a07b5 commit ed22aa5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

system/HTTP/CLIRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,6 @@ protected function parseCommand()
212212
*/
213213
public function isCLI(): bool
214214
{
215-
return true;
215+
return is_cli();
216216
}
217217
}

system/HTTP/IncomingRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function negotiate(string $type, array $supported, bool $strictMatch = fa
347347
*/
348348
public function isCLI(): bool
349349
{
350-
return false;
350+
return is_cli();
351351
}
352352

353353
/**

tests/system/HTTP/IncomingRequestTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ public function testCanGrabGetRawInput()
438438

439439
public function testIsCLI()
440440
{
441-
$this->assertFalse($this->request->isCLI());
441+
// this should be the case in unit testing
442+
$this->assertTrue($this->request->isCLI());
442443
}
443444

444445
public function testIsAJAX()

0 commit comments

Comments
 (0)