Beispiel #1
0
 public function testClientGetsCorrectUpdateRequest()
 {
     $client = $this->getClient();
     $ripe = new WebService($client);
     $obj = new RegObject('update');
     $ripe->update($obj);
     $expected = '{"objects":{"object":[{"source":{"id":"TEST"},"attributes":{"attribute":[{"name":"register","value":"update"},{"name":"source","value":"TEST"}]}}]}}';
     $this->assertEquals('PUT', $client->method);
     $this->assertEquals('https://rest-test.db.ripe.net/test/register/update?password=emptypassword', $client->url);
     $this->assertEquals($expected, $client->body);
 }