Ejemplo n.º 1
0
 function testPostWithParams()
 {
     $c = Rest\Client::post($this->url . "/Foo/hello", array("name" => "diogo"));
     $this->assertEqual($c->getResponse(), "Hello , Diogo.");
 }
Ejemplo n.º 2
0
 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);
 }