[TASK] Improve mocking in ConnectionTest to prepare for dbal 2.11