*/ public static function candidateHashDataProvider(): iterable { yield 'Normal' => ['Q2xhdWRpYQ']; yield 'lowercase' => ['Y2xhdWRpYQ']; yield 'UPPERCASE' => ['Q0xBVURJQQ']; } #[DataProvider('candidateHashDataProvider')] public function testGetCandidateByHash(string $hash): void { $krtekSeason = $this->getSeasonByCode('krtek'); $candidate = $this->candidateRepository->getCandidateByHash( $krtekSeason, $hash, ); $this->assertInstanceOf(Candidate::class, $candidate); $this->assertSame('Claudia', $candidate->name); } public function testGetCandidateByHashUnknownHashReturnsNull(): void { $krtekSeason = $this->getSeasonByCode('krtek'); $result = $this->candidateRepository->getCandidateByHash( $krtekSeason, 'TWFyaWpu', ); $this->assertNotInstanceOf(Candidate::class, $result); } public function testGetCandidateByHashInvalidBase64HashReturnsNull(): void { $krtekSeason = $this->getSeasonByCode('krtek'); $result = $this->candidateRepository->getCandidateByHash( $krtekSeason, 'TWFyaWpu*', ); $this->assertNotInstanceOf(Candidate::class, $result); } }