Generator bug: Duplicate method generation #98

wants to merge 3 commits into


None yet

2 participants


I've run into a bug in the generator, where it would generate the on method twice. I've attached a failing test case that demonstrates the issue.

I suggest you refactor Generator::createClassMockCode into smaller sub-methods so that you can check only the code inside the class, instead of all of the other boilerplate crap that is not really helpful in this case. It might already be possible to achieve by making the methods non-static and mocking out the methods that provide the boilerplate code (like _getStandardMethods).


Duplication verified using the PR rebased to master.


This PR has been merged in local branch generator-fail for investigation

@davedevelopment davedevelopment referenced this pull request Feb 15, 2013

1.0 Tidy Up #118

@davedevelopment davedevelopment added a commit to davedevelopment/mockery that referenced this pull request Jan 17, 2014
@davedevelopment davedevelopment Add test for #98 639c95f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment