Beispiel #1
0
 public function testIsHangedWithWordTrial()
 {
     $game = new Game(new Word('filament'), 0, 5);
     $this->assertFalse($game->isHanged());
     $game->tryWord('foo');
     $this->assertTrue($game->isHanged());
 }
Beispiel #2
0
 public function testTryInvalidWord()
 {
     $game = new Game(new Word('php'));
     $this->assertFalse($game->tryWord('html'));
     $this->assertEquals(Game::MAX_ATTEMPTS, $game->getAttempts());
 }