Skip to content

Conversation

morozov
Copy link
Member

@morozov morozov commented May 1, 2022

Similar to #9707, this patch reworks the tests that use hard-coded DriverMock in favor of a PHPUnit-generated mock and removes the no longer used methods from DriverMock.

Note that the reworked version of the test uses the internal Cache\ArrayResult class from the DBAL. While it's not ideal, it's acceptable. If this class changes upstream, it can be easily copy-pasted to the test suite.

I'll continue reworking tests only for 3.0.x since mocking both the DBAL 2.x and 3.x APIs in ORM 2.x tests requires extra effort.

@morozov morozov added this to the 2.12.2 milestone May 1, 2022
@morozov morozov marked this pull request as draft May 1, 2022 18:52
@morozov morozov changed the base branch from 2.12.x to 3.0.x May 1, 2022 19:34
@morozov morozov marked this pull request as ready for review May 1, 2022 20:28
@morozov morozov requested review from derrabus and greg0ire and removed request for derrabus May 1, 2022 20:28
@derrabus derrabus modified the milestones: 2.12.2, 3.0.0 May 1, 2022
@derrabus derrabus merged commit 6fe69f1 into doctrine:3.0.x May 1, 2022
@morozov morozov deleted the cleanup-driver-mock branch May 1, 2022 20:44
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.

2 participants