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

Fix/overloading fully qualified names #404

Merged
merged 2 commits into from
Dec 24, 2014
Merged

Fix/overloading fully qualified names #404

merged 2 commits into from
Dec 24, 2014

Conversation

robertbasic
Copy link
Collaborator

Hey!

I caught a bug yesterday when overloading classes.

If the overloading was done with Mockery::mock('overload:\MyNamespace\Class'), PHP would trigger a somewhat criptic error:

PHP Fatal error: Undefined constant 'MyNamespace' in /home/robert/www/mockery/library/Mockery/Loader/EvalLoader.php(16) : eval()'d code on line 21

This fix left trims the backslash from the namespace name to generate valid PHP code.

P.S.: New code looks sweet! It was very easy to find and fix the bug :)

davedevelopment added a commit that referenced this pull request Dec 24, 2014
…ied-names

Fix/overloading fully qualified names
@davedevelopment davedevelopment merged commit 96a8596 into mockery:master Dec 24, 2014
@davedevelopment
Copy link
Collaborator

Awesome! Thank you.

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.

None yet

2 participants