This commit is contained in:
2025-11-03 08:12:12 +01:00
parent 85c7725289
commit eb1e6f3de0

View File

@@ -5,7 +5,10 @@ declare(strict_types=1);
namespace Tvdt\Tests\Repository; namespace Tvdt\Tests\Repository;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use Psr\Clock\ClockInterface;
use Symfony\Component\Clock\MockClock;
use Tvdt\Entity\Quiz; use Tvdt\Entity\Quiz;
use Tvdt\Entity\QuizCandidate;
use Tvdt\Repository\GivenAnswerRepository; use Tvdt\Repository\GivenAnswerRepository;
use Tvdt\Repository\QuizRepository; use Tvdt\Repository\QuizRepository;
@@ -45,6 +48,18 @@ final class QuizRepositoryTest extends DatabaseTestCase
public function testGetScores(): void public function testGetScores(): void
{ {
$clock = new MockClock('2025-11-01 16:00:00');
self::getContainer()->set(ClockInterface::class, $clock);
$krtekSeason = $this->getSeasonByCode('krtek');
$candidate = $this->getCandidateBySeasonAndName($krtekSeason, 'Iris');
// Start Quiz
$qc = new QuizCandidate($krtekSeason->activeQuiz, $candidate);
$this->entityManager->persist($qc);
$this->entityManager->flush();
dump($qc->created);
$this->markTestIncomplete('TODO: Make fixtures first and write good test.'); $this->markTestIncomplete('TODO: Make fixtures first and write good test.');
} }
} }