-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
introduction of mocking on "Functions should only be one level of abstraction" should be removed #51
Comments
@xMarkusx please explain, i not understood you. If i leave |
No there is nothing wrong with the refactoring. Maybe this example is to abstract as i don't fully understand what Lexer, Tokenizer and BetterJSAlternative are supposed to do. Since this is unclear, i would simply remove the last sentence Maybe the topic unit testing and mocking should be handled in a separate section where we can go more into detail when and how to mock? |
I also do not understand the purpose of the In one thing, i agree with you. The example is too complex and not obvious. We need to think about the best example. |
please closed this once it is solved already @xMarkusx @peter-gribanov |
https://github.com/jupeter/clean-code-php#functions-should-only-be-one-level-of-abstraction
I think your refactoring results in two helper-classes "Lexer" and "Tokenizer". These types of classes should not be mocked nor handled by the di-framework.
Uncle Bob suggests to
http://blog.cleancoder.com/uncle-bob/2014/05/10/WhenToMock.html
The text was updated successfully, but these errors were encountered: