[PhpUnitBridge] Added ClassExistsMock#28931
[PhpUnitBridge] Added ClassExistsMock#28931fabpot merged 1 commit intosymfony:masterfrom ro0NL:symbol-mock
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_existsto enable specific code path testing