Issue #3402294 by mstrelan, quietone, dww, smustgrave: Fix strict type errors: Convert FormattableMarkup to strings (complex replacement) in core Kernel tests (cherry picked from commit 955418c2)