-
Notifications
You must be signed in to change notification settings - Fork 354
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
New method for getting the content #734
Comments
I separated the methods for this issue in #735 |
I've already left some question in the PR bu now that I'm seeing the code here I wonder why not create a mock or concrete implementation of the You could even use your own Laravel version running in production and not only in tests. |
I dont want to override the whole FileGetContents-Class, but if you dont like the merge request I must do it ;) |
Wel the thing is the Interface has been put in place for a reason. To extend this library to the specific needs of you application. Having a method that can be overloaded means this method becomes the one people will start relying on. If we where to change this method issues could pop up with users. From my perspective there are two options:
For now "i'll close the issue and PR as this doesn't fit in this package (for now). Feel free to comment if you have any additional insights/thoughts that could change the decision on this issue. |
In the FileGetContents-Class is this code:
That do some problems in unit tests, cause you cant mock or fake the schema files. My example idea is this in Laravel, if someone want to test the code later (or extend the file in a seperate file):
In the unit test, you can mock it:
The text was updated successfully, but these errors were encountered: