/** * Returns an instance of the ApiClient for use in the Traffic Management * tests. * * The test API client has the test adapter already setup, to ease testing * and prevent calls to the live API servers. * * @return DnsApiClient */ public static function getTestTMApiClient() { $adapter = new TestAdapter(); $client = new HttpClient('http://www.example.com', array('adapter' => $adapter)); $apiClient = new DnsApiClient($client); // use a dummy token $apiClient->setToken('xxxxxxxx'); return $apiClient; }