/** * @test */ public function testLose() { $id = $this->getPlayerId(42); $name = 'Douglas'; $lives = 5; $game = \Mockery::mock('\\Hangman\\Entity\\Hangman'); $game->shouldReceive('getId')->andReturn($this->getMiniGameId(33)); $player = new HangmanPlayer($id, $name, $lives, $game); $this->assertFalse($player->hasLost()); $this->assertFalse($player->hasWon()); $player->lose(); $this->assertTrue($player->hasLost()); }