Beispiel #1
0
 /**
  * Test HTTP DELETE method detection
  */
 public function testIsDelete()
 {
     $env = \Slim\Environment::mock(array('REQUEST_METHOD' => 'DELETE'));
     $req = new \Slim\Http\Request($env);
     $this->assertTrue($req->isDelete());
 }
Beispiel #2
0
 /**
  * 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());
 }