function testCanUpdateUser() { $c = Rest\Client::put($this->url . "/users/diogok", json_encode(array("login" => "diogok", "password" => "123456", "name" => "Diogo Silva")), "diogok", "123456", "application/json"); $this->assertEqual($c->getResponseCode(), 200); $c = Rest\Client::get($this->url . "/users/diogok", null, "diogok", "123456"); $this->assertEqual($c->getResponseCode(), 200); $u = json_decode($c->getResponse()); $this->assertEqual($u->name, "Diogo Silva"); }