コード例 #1
0
ファイル: RequestTest.php プロジェクト: ceroberoz/kurs
 /**
  * Test is not form data
  */
 public function testIsNotFormData()
 {
     $env = Slim_Environment::mock(array('slim.input' => '', 'CONTENT_TYPE' => 'application/json'));
     $req = new Slim_Http_Request($env);
     $this->assertFalse($req->isFormData());
 }
コード例 #2
0
ファイル: RequestTest.php プロジェクト: nerdfiles/slim_bp
 /**
  * Test is not form data
  */
 public function testIsNotFormData()
 {
     Slim_Environment::mock(array('REQUEST_METHOD' => 'PUT', 'REMOTE_ADDR' => '127.0.0.1', 'SCRIPT_NAME' => '/foo/index.php', 'PATH_INFO' => '/bar/xyz', 'QUERY_STRING' => 'one=1&two=2&three=3', 'SERVER_NAME' => 'slim', 'SERVER_PORT' => 80, 'slim.url_scheme' => 'http', 'slim.input' => '', 'slim.errors' => fopen('php://stderr', 'w'), 'CONTENT_TYPE' => 'application/json'));
     $env = Slim_Environment::getInstance();
     $req = new Slim_Http_Request($env);
     $this->assertFalse($req->isFormData());
 }