Skip to content

Commit 19bc91e

Browse files
cubercslvmcj
authored andcommitted
test: fix testGetResultsData
Add every group in medal category
1 parent 667bf7f commit 19bc91e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

webapp/tests/Unit/Service/ImportExportServiceTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,6 @@ public function testGetResultsData(bool $full, bool $honors, string $expectedRes
11811181
->setShortname('wf47')
11821182
->setStarttimeString($startTime->format(DateTimeInterface::ATOM))
11831183
->setEndtimeString($startTime->add(new DateInterval('PT5H'))->format(DateTimeInterface::ATOM));
1184-
$em->persist($contest);
1185-
$em->flush();
11861184

11871185
$groupsById = [];
11881186
$groupsData = json_decode(file_get_contents(__DIR__ . '/../Fixtures/sample-groups.json'), true);
@@ -1194,7 +1192,12 @@ public function testGetResultsData(bool $full, bool $honors, string $expectedRes
11941192
$em->persist($group);
11951193
$em->flush();
11961194
$groupsById[$group->getExternalid()] = $group;
1195+
$contest->addMedalCategory($group);
11971196
}
1197+
1198+
$em->persist($contest);
1199+
$em->flush();
1200+
11981201
$teamsData = json_decode(file_get_contents(__DIR__ . '/../Fixtures/sample-teams.json'), true);
11991202
/** @var array<string,Team> $teamsById */
12001203
$teamsById = [];

0 commit comments

Comments
 (0)