/**
  * @test
  * @dataProvider invalidPlayerNames
  */
 public function it_should_throw_an_exception_registering_a_player_with_an_invalid_name($name)
 {
     $this->setExpectedException(PlayerNameNotValidException::class);
     $command = PlayerRegistrationStub::named($name);
     $this->handler->handle($command);
 }
示例#2
0
 private function command()
 {
     return function (array $playerInfo) {
         return PlayerRegistrationStub::create($playerInfo['id'], $playerInfo['name']);
     };
 }