Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 /**
  * @expectedException \frontend\exceptions\CannotStartWithoutCharacterException
  */
 public function testStartGameWithEmptyPlayer()
 {
     $game = GameWithoutCharacters::get();
     $game->start();
 }
Exemplo n.º 3
0
 public function setUp()
 {
     $this->game = GameWithoutCharacters::get();
     $this->game->getCharacterPool()->addBee(new Healer($this->game));
     $this->game->getHoneyPool()->bringHoney(10000);
 }
Exemplo n.º 4
0
 public function setUp()
 {
     $this->game = GameWithoutCharacters::get();
     $this->game->getCharacterPool()->addBee(new Worker($this->game));
 }
Exemplo n.º 5
0
 public static function setUpBeforeClass()
 {
     self::$game = GameWithoutCharacters::get();
     self::$pool = self::$game->getCharacterPool();
 }