padraic/mockery — pull request #98 by igorw (2012-10-12 22:31:48+00:00)
Title: Generator bug: Duplicate method generation

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`).