示例#1
0
 function testGetNonEnglishRealm()
 {
     $client = Shared::Client();
     $client->setRegion('eu');
     $realm = $client->getRealmApi()->getRealm('Термоштепсель');
     $this->assertNotEquals(false, $realm);
     $this->assertArrayHasKey('type', $realm);
     $this->assertArrayHasKey('queue', $realm);
     $this->assertArrayHasKey('status', $realm);
     $this->assertArrayHasKey('population', $realm);
     $this->assertArrayHasKey('name', $realm);
     $this->assertArrayHasKey('slug', $realm);
 }
 /**
  * @expectedException        WowApi\Exception\NotFoundException
  */
 public function testSendToNonExistantResource()
 {
     $client = Shared::Client();
     $response = $client->getRequest()->api('character/blank/blank');
     $this->assertEquals(404, $response['headers']['http_code']);
 }
示例#3
0
 /**
  * @expectedException        \InvalidArgumentException
  * @expectedExceptionMessage The locale `doesntExist` for region `us` is not supported.
  */
 function testInvalidLocale()
 {
     $client = Shared::Client();
     $client->setRegion('us', 'doesntExist');
 }
示例#4
0
 protected function setUp()
 {
     $this->client = Shared::Client();
 }
示例#5
0
 protected function setUp()
 {
     $this->api = Shared::Client()->getCharacterApi();
 }
示例#6
0
 protected function setUp()
 {
     $this->api = Shared::Client()->getGuildApi();
 }