コード例 #1
0
 function testPostWithParams()
 {
     $c = Rest\Client::post($this->url . "/Foo/hello", array("name" => "diogo"));
     $this->assertEqual($c->getResponse(), "Hello , Diogo.");
 }
コード例 #2
0
ファイル: test.php プロジェクト: HashtagPurvi/restserver
 function testUserInsertion()
 {
     $c = Rest\Client::post($this->url . "/users", json_encode(array("login" => "diogok", "password" => "123456", "name" => "Diogo Souza")), null, null, "application/json");
     $this->assertEqual($c->getResponseCode(), 201);
 }