Beispiel #1
0
 public function testScore()
 {
     $game = new Bowling();
     $game->roll(5, 5);
     $this->assertEquals(10, $game->score());
 }
 /**
  * @dataProvider dataProvider
  */
 public function testGames($score, $rolls)
 {
     $bowling = new Bowling();
     $this->assertEquals($score, $bowling->score($rolls));
 }
Beispiel #3
0
 public function testAllStrikesButTheLastOne()
 {
     $game = new Bowling('XXXXXXXXXX11');
     $this->assertEquals(8 * 30 + 22 + 12, $game->score());
 }