Ejemplo n.º 1
0
 public function testHttpRedirectServiceDeletion()
 {
     $httpRedirect = new HTTPRedirect();
     $httpRedirect->setFqdn('test.example.com')->setUrl('http://example.com/somethingelse')->setCode(302)->setKeepUri(false);
     // simulate the Dyn API response
     $this->apiClient->getHttpClient()->getAdapter()->setResponse("HTTP/1.1 200 OK" . "\r\n" . "Content-type: application/json" . "\r\n\r\n" . '{"status": "success", "data": {"url": "http://example.com/somethingelse", "code": "302", "keep_uri": "", "fqdn": "test.example.com", "zone": "example.com"}, "job_id": 12345678, "msgs": [{"INFO": "update: Update successful", "SOURCE": "BLL", "ERR_CD": null, "LVL": "INFO"}]}');
     $this->assertTrue($this->zone->deleteService($httpRedirect, 'test.example.com'));
 }