Skip to content

Comments

Remove driver unit test boilerplate#7178

Merged
morozov merged 1 commit intodoctrine:4.3.xfrom
morozov:remove-driver-unit-test-boilerplate
Oct 8, 2025
Merged

Remove driver unit test boilerplate#7178
morozov merged 1 commit intodoctrine:4.3.xfrom
morozov:remove-driver-unit-test-boilerplate

Conversation

@morozov
Copy link
Member

@morozov morozov commented Oct 8, 2025

This boilerplate doesn't seem to provide any value. Specifically:

  1. createSchemaManager() is not called from anywhere, so it can be removed.
  2. createPlatform() is called only from createSchemaManager(), so now it can be removed as well.
  3. createExceptionConverter() is only used by testReturnsExceptionConverter(), which basically asserts that the library code is the same as the test code. This is pointless, so both these methods can be removed.
  4. At this point, some Abstract<Some>DriverTestCase classes become empty, can be removed in favor of the concrete driver test case classes extending the AbstractDriverTestCase class directly.
  5. Also, some concrete driver tests can be removed because they don't contain any tests other than testReturnsExceptionConverter() which they inherited from AbstractDriverTestCase.

@morozov morozov added this to the 4.3.4 milestone Oct 8, 2025
@morozov morozov marked this pull request as ready for review October 8, 2025 08:31
@morozov morozov requested a review from greg0ire October 8, 2025 08:32
@morozov morozov merged commit 836900a into doctrine:4.3.x Oct 8, 2025
96 checks passed
@morozov morozov deleted the remove-driver-unit-test-boilerplate branch October 8, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants