We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def2306 commit 97c539cCopy full SHA for 97c539c
1 file changed
tests/system/HTTP/IncomingRequestTest.php
@@ -17,6 +17,7 @@
17
use CodeIgniter\Test\CIUnitTestCase;
18
use Config\App;
19
use Generator;
20
+use InvalidArgumentException;
21
use TypeError;
22
23
/**
@@ -649,6 +650,16 @@ public function testIsHTTPMethodUpperCase(string $value)
649
650
$this->assertTrue($request->is($value));
651
}
652
653
+ public function testIsInvalidValue()
654
+ {
655
+ $this->expectException(InvalidArgumentException::class);
656
+ $this->expectExceptionMessage('Unknown value: invalid');
657
+
658
+ $request = $this->request->withMethod('GET');
659
660
+ $request->is('invalid');
661
+ }
662
663
public function testIsJson()
664
{
665
$request = $this->request->setHeader('Content-Type', 'application/json');
0 commit comments