fix: project troop times for game clock responses

This commit is contained in:
2026-08-07 16:35:59 +00:00
parent 463554654c
commit dc56ee1c06
2 changed files with 31 additions and 4 deletions
+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,
);
}
}