public function testGetRewardsInformationData()
 {
     $information = $this->apiService->getRewardsInformation(Entity\Region::Europe);
     /**
      * @var $portrait Entity\Reward\Portrait
      * @var $terranDecal Entity\Reward\Decal
      * @var $zergDecal Entity\Reward\Decal
      * @var $protossDecal Entity\Reward\Decal
      * @var $animation Entity\Reward\Animation
      * @var $skin Entity\Reward\Skin
      */
     foreach ($information->getPortraits() as $portrait) {
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Reward\\Portrait', $portrait);
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Icon', $portrait->getIcon());
         $this->assertNotNull($portrait->getId());
         $this->assertNotNull($portrait->getTitle());
         $this->assertNotNull($portrait->getAchievementId());
     }
     foreach ($information->getTerranDecals() as $terranDecal) {
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Reward\\Decal', $terranDecal);
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Icon', $terranDecal->getIcon());
         $this->assertNotNull($terranDecal->getId());
         $this->assertNotNull($terranDecal->getTitle());
         $this->assertNotNull($terranDecal->getAchievementId());
     }
     foreach ($information->getZergDecals() as $zergDecal) {
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Reward\\Decal', $zergDecal);
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Icon', $zergDecal->getIcon());
         $this->assertNotNull($zergDecal->getId());
         $this->assertNotNull($zergDecal->getTitle());
         $this->assertNotNull($zergDecal->getAchievementId());
     }
     foreach ($information->getProtossDecals() as $protossDecal) {
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Reward\\Decal', $protossDecal);
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Icon', $protossDecal->getIcon());
         $this->assertNotNull($protossDecal->getId());
         $this->assertNotNull($protossDecal->getTitle());
         $this->assertNotNull($protossDecal->getAchievementId());
     }
     foreach ($information->getSkins() as $skin) {
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Reward\\Skin', $skin);
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Icon', $skin->getIcon());
         $this->assertNotNull($skin->getId());
         $this->assertNotNull($skin->getTitle());
         $this->assertNotNull($skin->getAchievementId());
     }
     foreach ($information->getAnimations() as $animation) {
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Reward\\Animation', $animation);
         $this->assertInstanceOf('\\petrepatrasc\\BlizzardApiBundle\\Entity\\Icon', $animation->getIcon());
         $this->assertNotNull($animation->getId());
         $this->assertNotNull($animation->getTitle());
         $this->assertNotNull($animation->getAchievementId());
     }
 }
 public function testGetRewardsInformationData()
 {
     $this->callServiceMock->expects($this->atLeastOnce())->method('makeCallToApiService')->withAnyParameters()->will($this->returnValue(file_get_contents(self::MOCK_PATH . 'rewards-information.json')));
     $rewardsInformation = $this->apiService->getRewardsInformation(Entity\Region::Europe);
     /**
      * @var $portrait Entity\Reward\Portrait
      * @var $terranDecal Entity\Reward\Decal
      * @var $zergDecal Entity\Reward\Decal
      * @var $protossDecal Entity\Reward\Decal
      * @var $animation Entity\Reward\Animation
      * @var $skin Entity\Reward\Skin
      */
     // Check portrait
     $temp = $rewardsInformation->getPortraits();
     $portrait = $temp[0];
     $this->assertEquals("Kachinsky", $portrait->getTitle());
     $this->assertEquals(2951153716, $portrait->getId());
     $this->assertEquals(0, $portrait->getIcon()->getXCoordinate());
     $this->assertEquals(0, $portrait->getIcon()->getYCoordinate());
     $this->assertEquals(90, $portrait->getIcon()->getWidth());
     $this->assertEquals(90, $portrait->getIcon()->getHeight());
     $this->assertEquals(0, $portrait->getIcon()->getOffset());
     $this->assertEquals("http://media.blizzard.com/sc2/portraits/0-90.jpg", $portrait->getIcon()->getUrl());
     $this->assertEquals(0, $portrait->getAchievementId());
     // Check terran decal
     $temp = $rewardsInformation->getTerranDecals();
     $terranDecal = $temp[0];
     $this->assertEquals("Akilae Tribe", $terranDecal->getTitle());
     $this->assertEquals(3441709157, $terranDecal->getId());
     $this->assertEquals(0, $terranDecal->getIcon()->getXCoordinate());
     $this->assertEquals(-225, $terranDecal->getIcon()->getYCoordinate());
     $this->assertEquals(75, $terranDecal->getIcon()->getWidth());
     $this->assertEquals(75, $terranDecal->getIcon()->getHeight());
     $this->assertEquals(24, $terranDecal->getIcon()->getOffset());
     $this->assertEquals("http://media.blizzard.com/sc2/decals/0-75.jpg", $terranDecal->getIcon()->getUrl());
     $this->assertEquals(0, $terranDecal->getAchievementId());
     // Check zerg decal
     $temp = $rewardsInformation->getZergDecals();
     $zergDecal = $temp[0];
     $this->assertEquals("Akilae Tribe", $zergDecal->getTitle());
     $this->assertEquals(1187203361, $zergDecal->getId());
     $this->assertEquals(-150, $zergDecal->getIcon()->getXCoordinate());
     $this->assertEquals(-225, $zergDecal->getIcon()->getYCoordinate());
     $this->assertEquals(75, $zergDecal->getIcon()->getWidth());
     $this->assertEquals(75, $zergDecal->getIcon()->getHeight());
     $this->assertEquals(26, $zergDecal->getIcon()->getOffset());
     $this->assertEquals("http://media.blizzard.com/sc2/decals/0-75.jpg", $zergDecal->getIcon()->getUrl());
     $this->assertEquals(0, $zergDecal->getAchievementId());
     // Check protoss decal
     $temp = $rewardsInformation->getProtossDecals();
     $protossDecal = $temp[0];
     $this->assertEquals("Akilae Tribe", $protossDecal->getTitle());
     $this->assertEquals(2009110693, $protossDecal->getId());
     $this->assertEquals(-75, $protossDecal->getIcon()->getXCoordinate());
     $this->assertEquals(-225, $protossDecal->getIcon()->getYCoordinate());
     $this->assertEquals(75, $protossDecal->getIcon()->getWidth());
     $this->assertEquals(75, $protossDecal->getIcon()->getHeight());
     $this->assertEquals(25, $protossDecal->getIcon()->getOffset());
     $this->assertEquals("http://media.blizzard.com/sc2/decals/0-75.jpg", $protossDecal->getIcon()->getUrl());
     $this->assertEquals(0, $protossDecal->getAchievementId());
     // Check skin
     $temp = $rewardsInformation->getSkins();
     $skin = $temp[0];
     $this->assertEquals("Default", $skin->getTitle());
     $this->assertEquals("Thor", $skin->getName());
     $this->assertEquals(3979921667, $skin->getId());
     $this->assertEquals(0, $skin->getIcon()->getXCoordinate());
     $this->assertEquals(-150, $skin->getIcon()->getYCoordinate());
     $this->assertEquals(75, $skin->getIcon()->getWidth());
     $this->assertEquals(75, $skin->getIcon()->getHeight());
     $this->assertEquals(18, $skin->getIcon()->getOffset());
     $this->assertEquals("http://media.blizzard.com/sc2/skins/0-75.jpg", $skin->getIcon()->getUrl());
     $this->assertEquals(0, $skin->getAchievementId());
     // Check animation
     $temp = $rewardsInformation->getAnimations();
     $animation = $temp[0];
     $this->assertEquals("Marauder", $animation->getTitle());
     $this->assertEquals("/dance", $animation->getCommand());
     $this->assertEquals(3065782512, $animation->getId());
     $this->assertEquals(0, $animation->getIcon()->getXCoordinate());
     $this->assertEquals(0, $animation->getIcon()->getYCoordinate());
     $this->assertEquals(75, $animation->getIcon()->getWidth());
     $this->assertEquals(75, $animation->getIcon()->getHeight());
     $this->assertEquals(0, $animation->getIcon()->getOffset());
     $this->assertEquals("http://media.blizzard.com/sc2/animations/0-75.jpg", $animation->getIcon()->getUrl());
     $this->assertEquals(0, $animation->getAchievementId());
 }