/** * @depends testToDieWith1BeeInPoolReturnWin */ public function testToDieWith2BeesInPoolReturnNotFinishedAndCountBeesInPoolEqualsOne() { $this->game->getCharacterPool()->addBee(new BeeChild($this->game)); $this->game->getCharacterPool()->addBee(new BeeChild($this->game)); $this->game->start(); $this->game->getCharacterPool()->searchBee()->toDie(); $this->assertFalse($this->game->isFinished()); $this->assertEquals(1, count($this->game->getCharacterPool()->getBees())); }
public function actionFinished() { if (!$this->game->isFinished()) { return $this->redirect('/game/overview'); } return $this->render('finished', ['game' => $this->game]); }