-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] Added ClassExistsMock #28931
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
Conversation
Mocks don't work with root-namespaced functions, and it turns out that |
ouch :( i didnt saw any root namespaced variant in code base. Also CS does not propose these functions (yet) right? |
Actually I was wrong sorry, |
@ro0NL thanks for creating symfony/symfony-docs#10528 to track this feature in Symfony Docs. Much appreciated! Sadly, the docs issue is not very actionable because the description of this PR is a bit lacking. Please update it to explain which changes would this require for full Symfony apps and for apps that use this as a stand-alone component. If no changes are needed, please add some before/after examples or show what can we do now that wasn't possible before. Thanks! |
should there be any annotation integration, ie. |
I'm not sure - not if we don't have a use case. |
#28898 could have one more test using |
Thank you @ro0NL. |
This PR was squashed before being merged into the 4.3-dev branch (closes #28931). Discussion ---------- [PhpUnitBridge] Added ClassExistsMock | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#10528 I've thought about this before, and bumped into it again when trying to test #28898 This PR allows to mock `class|interface|trait_exists` to enable specific code path testing Commits ------- 62caec1 [PhpUnitBridge] Added ClassExistsMock
I've thought about this before, and bumped into it again when trying to test #28898
This PR allows to mock
class|interface|trait_exists
to enable specific code path testing