Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect driver in tests based on configured driver name #4951

Merged
merged 3 commits into from
Nov 6, 2021

Conversation

morozov
Copy link
Member

@morozov morozov commented Nov 6, 2021

Q A
Type improvement
BC Break no

If a driver is wrapped in a decorator, then $connection->getDriver() will return the decorator, not the actual driver. It is better to drive the test logic based on the test configuration rather than based on introspecting the connection.

Additionally:

  1. Enable testing unique constraint violation handling on IBM DB2 and SQL Server (see Basic exception handling for SQL Server #4928, Basic exception handling for IBM DB2 #4929).
  2. Reuse the logic from PDO\ConnectionTest to cover all drivers. Otherwise, the test would require another assertion against the driver class.

@morozov morozov force-pushed the test-detect-driver branch from 222b084 to ca587df Compare November 6, 2021 03:22
@morozov morozov added this to the 3.2.0 milestone Nov 6, 2021
@morozov morozov marked this pull request as ready for review November 6, 2021 03:27
@morozov morozov requested review from derrabus and greg0ire November 6, 2021 03:27
@derrabus derrabus merged commit 7df7510 into doctrine:3.2.x Nov 6, 2021
@morozov morozov deleted the test-detect-driver branch November 10, 2021 04:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants