public function RequestTest::testIsMethod in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testIsMethod()
File
- vendor/
symfony/ http-foundation/ Tests/ RequestTest.php, line 1410
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testIsMethod() {
$request = new Request();
$request
->setMethod('POST');
$this
->assertTrue($request
->isMethod('POST'));
$this
->assertTrue($request
->isMethod('post'));
$this
->assertFalse($request
->isMethod('GET'));
$this
->assertFalse($request
->isMethod('get'));
$request
->setMethod('GET');
$this
->assertTrue($request
->isMethod('GET'));
$this
->assertTrue($request
->isMethod('get'));
$this
->assertFalse($request
->isMethod('POST'));
$this
->assertFalse($request
->isMethod('post'));
}