public function testKillAllCallingInToDieMethod() { $game = GameWithoutCharacters::get(); /** @var Queen | \PHPUnit_Framework_MockObject_MockObject $stub */ $stub = $this->getMockBuilder(Queen::class)->enableOriginalConstructor()->setConstructorArgs([$game])->setMethods(['killAllBees'])->getMock(); $stub->expects($this->once())->method('killAllBees')->willReturn(true); $stub->toDie(); }
/** * @expectedException \frontend\exceptions\CannotStartWithoutCharacterException */ public function testStartGameWithEmptyPlayer() { $game = GameWithoutCharacters::get(); $game->start(); }
public function setUp() { $this->game = GameWithoutCharacters::get(); $this->game->getCharacterPool()->addBee(new Healer($this->game)); $this->game->getHoneyPool()->bringHoney(10000); }
public function setUp() { $this->game = GameWithoutCharacters::get(); $this->game->getCharacterPool()->addBee(new Worker($this->game)); }
public static function setUpBeforeClass() { self::$game = GameWithoutCharacters::get(); self::$pool = self::$game->getCharacterPool(); }