示例#1
0
 public function testGetGoalEvents()
 {
     $team1 = new Team();
     $team1->setId(1);
     $team2 = new Team();
     $team2->setId(2);
     $fixture = new Fixture();
     $fixture->setTeamHome($team1);
     $fixture->setTeamAway($team2);
     $fixture->addEvent(Event::createGoal($fixture, $team1, new Player(), 1));
     $fixture->addEvent(Event::createChance($fixture, $team2, new Player(), 2));
     $this->assertCount(1, $fixture->getGoalEvents());
 }
示例#2
0
 public function testChance()
 {
     $event = Event::createChance(new Fixture(), new Team(), new Player(), 1);
     $this->assertTrue($event->isChance());
 }