public function testGetCorrectTemplateInfoFromObject() { $client = $this->getClient('template'); $ripe = new WebService($client); $poem = new Poem('test'); $poem = $ripe->getObjectFromTemplate($poem); $this->assertEquals('poem', $poem->getType()); $this->assertEquals('poem', $poem->getPrimaryKeyName()); }
public function testClientGetsCorrectTemplateRequest() { $client = $this->getClient(); $ripe = new WebService($client); $poem = $ripe->getObjectFromTemplate('poem'); $this->assertEquals('GET', $client->method); $this->assertEquals('https://rest-test.db.ripe.net/metadata/templates/poem', $client->url); $this->assertNull($client->body); }