Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
 public function setUp()
 {
     parent::setUp();
     $entityFactory = new \Dotapi2\Entity\EntityFactory();
     $this->entity = $entityFactory->create('PickBan', ['hero_id' => 67, 'team' => 1, 'order' => 1]);
 }
Пример #4
0
 public function testExceptionEntityNotExists()
 {
     $this->expectException('\\Dotapi2\\Exceptions\\Exception');
     $factory = new \Dotapi2\Entity\EntityFactory();
     $factory->create('DoesNotExist', []);
 }