public function setUp()
 {
     $apiClient = TestBootstrap::getTestMMApiClient();
     $apiClient->setApiKey('xxxxxxxxxxxx');
     $this->mm = new MessageManagement('xxxxxxxxxxxx');
     $this->mm->setApiClient($apiClient);
 }
Example #2
0
 public function setUp()
 {
     $apiClient = TestBootstrap::getTestMMApiClient();
     $apiClient->setApiKey('xxxxxxxxxxxx');
     $this->sender = new Sender();
     $this->sender->setEmailAddress('*****@*****.**');
     $this->status = new Status($apiClient);
 }
Example #3
0
 public function setUp()
 {
     $this->apiClient = \DynTest\TestBootstrap::getTestTMApiClient();
     $this->zone = new Zone($this->apiClient);
     $this->zone->setName('example.com');
 }
 public function setUp()
 {
     $this->tm = new TrafficManagement('testcustomer', 'testusername', 'testpassword');
     $this->tm->setApiClient(TestBootstrap::getTestTMApiClient());
 }
 public function setUp()
 {
     $apiClient = TestBootstrap::getTestMMApiClient();
     $apiClient->setApiKey('xxxxxxxxxxxx');
     $this->accounts = new Accounts($apiClient);
 }
 public function setUp()
 {
     $this->client = TestBootstrap::getTestMMApiClient();
 }
     * 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;
    }
    /**
     * Returns an instance of the ApiClient for use in the Message
     * Management tests.
     *
     * The test API client has the test adapter already setup, to ease testing
     * and prevent calls to the live API servers.
     *
     * @return EmailApiClient
     */
    public static function getTestMMApiClient()
    {
        $adapter = new TestAdapter();
        $client = new HttpClient('http://www.example.com', array('adapter' => $adapter));
        return new EmailApiClient($client);
    }
}
TestBootstrap::init();