Posts tagged debugging
Now that we have PHPUnit installed, what do we do with it? Well first we’ll need to write a test script so we can test it against our pages and see if they’re doing what it is that we expect them to do. Here is a super simple example of a page that we’ll be testing against for this example:
One of the things that developers love to hate has to be testing their code. Any process that can make this part of the development life cycle as short and painless as possible is bound to be embraced by coders. If only there was a way where you could just write a test for the various scripts that a PHP application would have and save it so that any changes could be tested with just a click of a button?
For most of us, our introduction to PHP was pretty simple. Usually it was a website page, where the code flowed from top to bottom in a nice, orderly, procedural path. After all, that’s how it worked with HTML, so it should work fine with PHP.