assertIsInt($value); $this->assertGreaterThan(0, $value); } /** * @return void */ public function testMtRandProducesVaryingValuesAcrossCalls(): void { $values = []; for ($i = 0; $i < 100; $i++) { $values[] = mt_rand(); } // At least two distinct values in 100 calls — cache-busting requires variation $this->assertGreaterThan(1, count(array_unique($values))); } /** * The cache-buster is embedded in an HTML img src attribute via * html_escape(). Confirm the value round-trips safely. * * @return void */ public function testCacheBusterValueIsHtmlSafe(): void { $value = mt_rand(); $escaped = html_escape((string) $value); $this->assertSame((string) $value, $escaped); } }