Пример #1
0
 public function testHandler()
 {
     $this->assertTrue($this->handler->verifyAccessToken() instanceof stdClass);
     $this->assertTrue($this->handler->tokenDecode() instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getMarketTypes()));
     $this->assertTrue(is_array($this->handler->getMarketTypeHrefs()));
     $this->assertTrue(is_array($this->handler->getRegions()));
     $this->assertTrue($this->handler->getRegion(10000002) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getConstellationHrefs()));
     $this->assertTrue($this->handler->getConstellation(21000316) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getSolarSystemHrefs()));
     $this->assertTrue($this->handler->getSolarSystem(31000054) instanceof stdClass);
     $this->assertTrue($this->handler->getMarketOrders(34, 10000002) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getMarketHistory(34, 10000002)));
     $this->assertTrue(is_array($this->handler->getIndustrySystems()));
     $this->assertTrue(is_array($this->handler->getMarketPrices()));
     $this->assertTrue(is_array($this->handler->getIndustryFacilities()));
     $this->assertTrue(is_array($this->handler->getItemGroups()));
     $this->assertTrue($this->handler->getItemGroup(40) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getAlliances()));
     $this->assertTrue($this->handler->getAlliance(99000652) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getItemTypes()));
     $this->assertTrue($this->handler->getType(35) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getItemCategories()));
     $this->assertTrue($this->handler->getItemCategory(5) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getMarketGroups()));
     $this->assertTrue($this->handler->getMarketGroup(2) instanceof stdClass);
     $this->assertTrue(is_array($this->handler->getMarketGroupTypes(2)));
     $this->assertTrue(is_array($this->handler->getTournaments()));
     $this->assertTrue($this->handler->getWar(1) instanceof stdClass);
     $this->assertTrue($this->handler->getKillmail('http://public-crest.eveonline.com/killmails/30290604/787fb3714062f1700560d4a83ce32c67640b1797/') instanceof stdClass);
 }
Пример #2
0
 /**
  * Tests the CREST connection and prints the output of the access token verify call.
  *
  * @return void
  */
 protected function testCrest()
 {
     try {
         $charData = $this->endpointHandler->verifyAccessToken();
         echo "Test OK" . PHP_EOL;
         print_r($charData);
     } catch (\Exception $ex) {
         echo "Test failed" . PHP_EOL . get_class($ex) . ': ' . $ex->getMessage();
         exit;
     }
 }