示例#1
0
 public function testTryRightWord()
 {
     $game = new Game(new Word('filament'), 0, 5);
     $this->assertInstanceOf('hangman\\Word', $game->getWord());
     $this->assertTrue($game->tryWord('filament'));
     $this->assertEquals(0, $game->getAttempts());
 }
示例#2
0
 public function testTryWord()
 {
     $game = new Game(new Word('php'));
     $this->assertInstanceOf('Hangman\\Word', $game->getWord());
     $this->assertTrue($game->tryWord('php'));
     $this->assertEquals(0, $game->getAttempts());
 }