Issue #3587922: ApiMediaControllersPostTest fails intermittently due to...
The itok in image style URLs is derived from the upload path, which includes a date-based folder (YYYY-MM). The hardcoded expected token in ApiMediaControllersPostTest was only valid for the month it was recorded, causing the test to break at each monthly rollover. Example: https://git.drupalcode.org/project/canvas/-/jobs/9609943
Extends the existing URL normalization in testPost() to replace the URL-encoded itok value with an ::ITOK:: placeholder (alongside the existing::SITE_DIR_BASE_URL:: and ::MEDIA_FOLDER:: substitutions) and updates the expected values accordingly.
AI-Generated: Yes (Used claude to diagnose and fix).
Testing instructions
Tests passing
Closes #3587922
Edited by Sally Young