Slide 59
Slide 59 text
PHPSpec: red-green-refactor
class GetGameHandlerSpec extends ObjectBehavior
{
function let(
GameRepository $gameRepository,
UuidFactoryInterface $uuidFactory,
UuidInterface $gameId,
Game $game
) {
$this->beConstructedWith($gameRepository, $uuidFactory);
$uuidFactory->fromString('1234')->willReturn($gameId);
$gameRepository->get($gameId)->willReturn($game);
}
}