public function setUp()
 {
     $faker = Factory::create();
     $this->playerId = PlayerId::create($faker->uuid);
     $this->gameId = MiniGameId::create($faker->uuid);
     $this->context = \Mockery::mock(Context::class);
 }
 public function setUp()
 {
     $faker = Factory::create();
     $this->gameId = MiniGameId::create($faker->uuid);
     $this->eventSourcingRepository = \Mockery::mock(EventSourcingRepository::class);
     $this->miniGameRepository = new MiniGameEventSourcedRepository($this->eventSourcingRepository);
 }
Exemple #3
0
 /**
  * @test
  */
 public function itShouldAssertTwoIdWithTheSameUuidAreEqual()
 {
     $innerId = $this->faker->uuid;
     $id = MiniGameId::create($innerId);
     $sameId = MiniGameId::create($innerId);
     $this->assertTrue($id->equals($sameId));
     $this->assertTrue($sameId->equals($id));
     $otherInnerId = $this->faker->uuid;
     $otherId = MiniGameId::create($otherInnerId);
     $this->assertFalse($id->equals($otherId));
     $this->assertFalse($otherId->equals($id));
 }
 public function setUp()
 {
     $faker = Factory::create();
     $this->gameId = MiniGameId::create($faker->uuid);
     $this->playerId = PlayerId::create($faker->uuid);
     $this->miniGame = $this->getMiniGame($this->gameId, $faker->name);
     $this->player = $this->getPlayer($this->playerId, $faker->name);
     $this->move = \Mockery::mock(Move::class);
     $this->options = $this->getGameOptions();
     $this->playerOptions = \Mockery::mock(PlayerOptions::class);
     $this->context = \Mockery::mock(Context::class);
     $this->gameBuilder = \Mockery::mock(MiniGameFactory::class);
     $this->gameManager = \Mockery::mock(GameRepository::class);
     $this->errorHandler = \Mockery::mock(ErrorEventHandler::class);
     $this->miniGameCommandHandler = new MiniGameCommandHandler($this->gameBuilder, $this->gameManager, $this->errorHandler);
 }
 public function setUp()
 {
     $faker = Factory::create();
     $this->playerId = PlayerId::create($faker->uuid);
     $this->gameId = MiniGameId::create($faker->uuid);
 }