[BUGFIX] Tests: Improve mocking in DatabaseConnectionTest

With the switch to mysqli object it is now possible to fully mock
and check the final database calls in DatabaseConnectionTest, the
test table can be removed after refactoring the tests.

Change-Id: I60e33f6af5b4be8111a21469d12e38843650e7c4
Resolves: #56938
Related: #51436
Releases: 6.2
Reviewed-on: https://review.typo3.org/28422
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters