createOne(); $moveResults = new MoveResults($video, fake()->word(), fake()->word()); $result = $moveResults->toActionResult(); $this->assertTrue($result->hasFailed()); }); test('failed', function (): void { $video = Video::factory()->createOne(); $moves = []; foreach (range(0, fake()->randomDigitNotNull()) as $ignored) { $moves[fake()->word()] = true; } foreach (range(0, fake()->randomDigitNotNull()) as $ignored) { $moves[fake()->word()] = false; } $moveResults = new MoveResults($video, fake()->word(), fake()->word(), $moves); $result = $moveResults->toActionResult(); $this->assertTrue($result->hasFailed()); }); test('passed', function (): void { $video = Video::factory()->createOne(); $moves = []; foreach (range(0, fake()->randomDigitNotNull()) as $ignored) { $moves[fake()->word()] = true; } $moveResults = new MoveResults($video, fake()->word(), fake()->word(), $moves); $result = $moveResults->toActionResult(); $this->assertTrue($result->getStatus() === ActionStatus::PASSED); });