Today’s Objective(s)
- Learn to debug console PHP application
Delve deeper into the “expect” function used in testModelBoolean()Try to use the entire $I->wantTo(‘load all values’); style of CodeceptionResearch executing tests and viewing results from a browserResearch best practices for Unit testing in YiiResearch best pracices for acceptance/functional testing in Yii
Introduction
I’m really hoping that setting up debugging for PHP via CLI is easy since today is Friday and I would like to finish up early… let’s get straight into it.
At the moment I’m currently using PHP Storm (Using the 30 day trial to see if it’s something I would like to purchase, so far I’m on the fence since Netbeans does all that I currently need just as well as PHP Storm. But I’m going to try and expand my horizons and attempt to use everything PHP Storm has to offer before I make that decision), so this post will center mostly around using PHP Storm, although I think there will be some base PHP setup required as well.
Links
Links I find during the course of this post will be put in this section with a rating on usefulness:
- Stackoverflow question
- The second answer shows promise, PHP Storm is stopping on the first line of executing codeception when I run “codecept run unit”. And it stops at my breakpoint! (I was about to say that it wasn’t stopping at my breakpoint, but I wasn’t running it from the tests folder
)
- The second answer shows promise, PHP Storm is stopping on the first line of executing codeception when I run “codecept run unit”. And it stops at my breakpoint! (I was about to say that it wasn’t stopping at my breakpoint, but I wasn’t running it from the tests folder
Conclusion
Well that was easy enough, I now know how to debug a script that is being used in a console terminal. Although I don’t know how exactly, but I’m going to chalk this up as a win (Already started this an hour ago, fortunately hit that link just after starting to write this post to keep me going at it). Think I will have to delve deeper into xdebug to know more of the intricacies involved, but that’s out of scope for this topic.
Upcoming Objective(s)
Learn to debug console PHP application- Delve deeper into the “expect” function used in testModelBoolean()
- Try to use the entire $I->wantTo(‘load all values’); style of Codeception
- Research executing tests and viewing results from a browser
- Research best practices for Unit testing in Yii
- Research best pracices for acceptance/functional testing in Yii