Exemplo n.º 1
0
 /**
  * Test the magic getter.
  */
 public function testMagicGetter()
 {
     $destiny = new Destiny($this->http());
     $player = $destiny->fetchPlayer('aFreshMelon', 1);
     $character = $player->characters->first();
     $this->assertEquals(32, $character->characterLevel);
 }
 /**
  * Test the count method.
  */
 public function testCount()
 {
     $destiny = new Destiny($this->http());
     $player = $destiny->fetchPlayer('aFreshMelon', 1);
     $characterCollection = $player->characters;
     $this->assertEquals(3, $characterCollection->count());
 }
 /**
  * Test the fetchGrimoireData method.
  */
 public function testFetchGrimoireData()
 {
     $destiny = new Destiny($this->http());
     $player = $destiny->fetchPlayer('aFreshMelon', 1);
     $grimoireData = $player->fetchGrimoireData();
     $this->assertInternalType('array', $grimoireData);
     $this->assertArrayHasKey('cardCollection', $grimoireData['Response']['data']);
 }
 /**
  * Test that the translation of keys worked.
  */
 public function testGetByTranslatedKey()
 {
     $destiny = new Destiny($this->http());
     $player = $destiny->fetchPlayer('aFreshMelon', 1);
     $character = $player->characters->first();
     $progressionCollection = $character->progression;
     $this->assertInstanceOf('Destiny\\Game\\Progression', $progressionCollection->get('vanguard'));
 }
Exemplo n.º 5
0
 /**
  * Test the magic getter.
  */
 public function testMagicGetter()
 {
     $destiny = new Destiny($this->http());
     $player = $destiny->fetchPlayer('aFreshMelon', 1);
     $character = $player->characters->first();
     $inventory = $character->inventory;
     $item = $inventory->primary();
     $this->assertInternalType('string', $item->itemName);
 }
Exemplo n.º 6
0
 /**
  * Test the total steps.
  */
 public function testTotalSteps()
 {
     $destiny = new Destiny($this->http());
     $player = $destiny->fetchPlayer('aFreshMelon', 1);
     $character = $player->characters->first();
     $progression = $character->progression;
     $level = $progression->get('character_level');
     $this->assertInternalType('int', $level->totalSteps);
     $this->assertEquals(20, $level->totalSteps);
 }
Exemplo n.º 7
0
 /**
  * Test the weapons and armor methods.
  */
 public function testCollectionMethods()
 {
     $destiny = new Destiny($this->http());
     $player = $destiny->fetchPlayer('aFreshMelon', 1);
     $character = $player->characters->first();
     $inventory = $character->inventory;
     $this->assertInternalType('array', $inventory->weapons());
     $this->assertInternalType('array', $inventory->armor());
     $this->assertCount(3, $inventory->weapons());
     $this->assertCount(4, $inventory->armor());
 }