In this video, we'll build a relatively simple class, using TDD techniques. Along the way, we'll discuss various PHPUnit methods, how to create mock objects, and more!
***** yes, this is called Test-Driven Development' or TDD. 1. write test. 2. write code to make the test pass 3. clean up the code. again write another test and then process goes on like above :)
SublimeText is amazing, for multiple languages, and is *free (nagware). It's also growing very quickly, and plugins for it are excellent, and easy to write.
Wish I had the code in hand before I watched this video. At times I would like to check what I am learning against what you are showing; but, I can not see the example on screen at the time I think to look for reference in other parts of the code.
If you used the path info from Fetch_Task then you can't check it against what you expect it to be. That is why the path info is duplicated in the test class. If someone updates the paths Fetch_Task then the test will fail.
I realize this is an old video, but just like Jeffrey Way's book, it's too Laravel-centric. There's nothing wrong with Laravel, but there's absolutely no reason why you need a framework to use or teach PHPUnit.
While the procedure for testing is correct, the guy in the video is violating several S.O.L.I.D principles. Take this as a methodology of producing code, but do NOT copy his coding style without doing some serious refactoring. (He probably would’ve done so himself.)