Issue #3298906 by andypost, alexpott: Fix \Drupal\Tests\Core\Test\TestSetupTraitTest::testChangeDatabasePrefix() on PHP 8.2 (cherry picked from commit d2653f73)