예제 #1
0
 function let()
 {
     $this->playerTommy = Player::withName('Tommy');
     $this->playerDanny = Player::withName('Danny');
     $this->teamOne = SingleTeam::withPlayer($this->playerTommy);
     $this->teamTwo = SingleTeam::withPlayer($this->playerDanny);
     $this->beConstructedThrough('withTeams', array($this->teamOne, $this->teamTwo));
 }
예제 #2
0
 function it_should_throw_exception_if_setting_non_existing_team()
 {
     $player = Player::withName('Natalie');
     $this->shouldThrow('PingPong\\Team\\InvalidTeamException')->during('setServingTeam', [SingleTeam::withPlayer($player)]);
 }
예제 #3
0
 function it_should_throw_exception_when_trying_to_score_for_non_existing_team()
 {
     $player = Player::withName('Natalie');
     $this->shouldThrow('PingPong\\Team\\InvalidTeamException')->during('score', [SingleTeam::withPlayer($player)]);
 }