-
Notifications
You must be signed in to change notification settings - Fork 40
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
Please reconsider tests as 'central to the book' #12
Comments
Hi! So there are two very important things I'm considering when hearing this feedback from you and others:
I try to answer "How do I use these principles I'm learning about". Architecting code is about making code both testable and maintainable. I likely should have emphasized long term maintainability more, as that's where my head mostly is at when writing. My point of view is that really these goals (testable, maintainable) are one in the same. Testable code is also maintainable. However, adding some tests to the application code can definitely be beneficial. I'll see what I can do there. To reiterate: I don't plan on doing much writing on the subject of testing in the book. That's beyond the book's scope and purpose. I do, however, see the benefit of adding in a test or two to "prove" that I've actually created more testable code. The book does appear to "assume" it makes code more testable, by virtue of using dependency injection and other design principles. I will also definitely consider where I put emphasis within my writing. "Testable and Maintainable" is a phrase I started with early in the book's creation. However, it content ended up definitely being more about maintainability and code architecture. Lastly, I believe the reaction of the few asking about tests is more because I didn't correctly set expectations in regards to tests, rather than because tests aren't present (sorry!). Thanks again for your feedback, I do appreciate it. |
Just a little disappointed did'n see the Test code for this project. Great Book by the way. |
Over the last week or two I've worked on and off on adding some tests. This is where I am so far with them. That feature branch will get merged when ready (or possibly even sooner). |
👍 ✨ |
[In reference to #2]
Since everyone in the PHP community (even outside of Laravel) are pushing tests now, I might (personally, of course) challenge your statement that tests aren't central to a book about creating an application using Laravel.
There are at least 3 people including myself who have questioned this. I, myself, have often questioned the need for testing. But we're coming to a point where the case cannot be ignored.
I do think having at least a couple of quick sample tests would help a great deal. Just something to show the practicality of testing, and instances where it may help us catch issues.
The text was updated successfully, but these errors were encountered: