/** * Test HTTP OPTIONS method detection */ public function testIsOptions() { $env = \Slim\Environment::mock(array('REQUEST_METHOD' => 'OPTIONS')); $req = new \Slim\Http\Request($env); $this->assertTrue($req->isOptions()); }
/** * Test HTTP HEAD method detection */ public function testIsHead() { $env = \Slim\Environment::mock(array('REQUEST_METHOD' => 'HEAD')); $req = new \Slim\Http\Request($env); $this->assertFalse($req->isGet()); $this->assertFalse($req->isPost()); $this->assertFalse($req->isPut()); $this->assertFalse($req->isDelete()); $this->assertFalse($req->isOptions()); $this->assertTrue($req->isHead()); }