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

Remove unnecessary PDO test mock classes #2114

Merged
merged 6 commits into from
Oct 8, 2022
Merged

Remove unnecessary PDO test mock classes #2114

merged 6 commits into from
Oct 8, 2022

Conversation

MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Oct 7, 2022

Per the comment at the top of tests/Phinx/Db/Mock/PdoAdapterTestPDOMockWithExecChecks.php, it was only added because of an error that would occur under PHP 5.4 when trying to use $this->getMockForAbstractClass(\PDO::class). Given that we no longer support that version of PHP, we should try to move back to the expected way of doing PHPUnit mocks.

I found I could also remove tests/Phinx/Db/Mock/PdoAdapterTestPDOMock.php on somewhat similar grounds that it's easy enough to just make a PDO mock via phpunit for the one test it was used.

This class is also throwing a fatal error in #2113 and seems easier to kill off this class altogether than try to debug whatever is going wrong there.

@MasterOdin MasterOdin changed the title Remove unnecessary PDO test stub class Remove unnecessary PDO mock classes Oct 7, 2022
@MasterOdin MasterOdin changed the title Remove unnecessary PDO mock classes Remove unnecessary PDO test mock classes Oct 7, 2022
@MasterOdin MasterOdin merged commit d6e9fbd into 0.x Oct 8, 2022
@MasterOdin MasterOdin deleted the pdo-mock branch October 8, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant