Example #1
0
 public function testApiVersion()
 {
     $oGandi = new GandiAPITest(DefaultTest::getApiKey());
     $result = $oGandi->version->info();
     $this->assertEquals('version', $oGandi->getPrefix());
     $this->assertArrayHasKey('api_version', $result);
     $this->assertEquals($result['api_version'], DefaultTest::API_VERSION);
 }
Example #2
0
 public function testErrorNoMethodSet()
 {
     try {
         $oGandi = new GandiAPITest(self::getApiKey());
         $oGandi->version();
         $this->assertTrue(false);
     } catch (GandiException $e) {
         $this->assertTrue(true);
         $this->assertEquals(GandiException::ERROR_PREFIX_NOT_SET, $e->getMessage());
     }
 }