fix: project troop times for game clock responses

This commit is contained in:
Hide_D committed 2026-08-07 16:35:59 +00:00
1 parent 463554654c
commit dc56ee1c06
2 files changed
+31 -4

No files matched your search

+23
View File
@@ -183,4 +183,27 @@ final class GameClockBoundaryTest extends TestCase
);
}
public function testNationGeneralListProjectsStoredTimesAtApiBoundary(): void
{
$source = file_get_contents(__DIR__ . '/../hwe/sammo/API/Nation/GeneralList.php');
self::assertIsString($source);
self::assertStringContainsString(
'$clock = GameClock::isInitialized($gameStor) ? GameClock::fromStorage($gameStor) : null;',
$source,
);
self::assertStringContainsString(
'$env[\'turntime\'] = $formatStoredTime($env[\'turntime\']);',
$source,
);
self::assertStringContainsString(
'$troopTurnTime = $formatStoredTime($rawGeneralList[$troopLeaderID][\'turntime\']);',
$source,
);
self::assertStringContainsString(
"? (string)\$value",
$source,
);
}
}