public function setUp() { parent::setUp(); $entityFactory = new \Dotapi2\Entity\EntityFactory(); $matchData = json_decode(file_get_contents('./tests/Responses/getMatchDetails.json'), true); $this->data = $matchData['result']['players'][0]; $this->entity = $entityFactory->create('DetailedSlot', $this->data); }
public function setUp() { parent::setUp(); // TODO: Change the autogenerated stub $entityFactory = new \Dotapi2\Entity\EntityFactory(); $matchData = json_decode(file_get_contents('./tests/Responses/getMatchHistory.json'), true); $this->data = $matchData['result']['matches'][0]; $this->entity = $entityFactory->create('Match', $this->data); }
public function setUp() { parent::setUp(); $entityFactory = new \Dotapi2\Entity\EntityFactory(); $this->entity = $entityFactory->create('PickBan', ['hero_id' => 67, 'team' => 1, 'order' => 1]); }
public function testExceptionEntityNotExists() { $this->expectException('\\Dotapi2\\Exceptions\\Exception'); $factory = new \Dotapi2\Entity\EntityFactory(); $factory->create('DoesNotExist', []); }