Categories: Linux, Software Development

PHPUnit Essentials Book Review

PHPUnit Essentials would have come in handy while on a recent contracting gig and on all the other PHP projects I’ve worked on. The book is published by Packt Publishing, the last book I bought from them was on AngularJS and it was a great guide whereas as the O’Reilly book on AngularJS was outdated.

Overall the book was a good read and it’s worth getting as both a guide and a reference.
Continue reading “PHPUnit Essentials Book Review”

Categories: Software Development

some code for running PHPunit in Emacs

I’m working on a legacy PHP app for a client and up until today I was running unit tests in a terminal window. But my natural working enviornment is Emacs so why not write something that will execute the unit tests and display the results in an Emacs buffer?

The following is the result; it’s fairly short but oh so useful.

[gist 8981483]

The client’s PHP app has been around for 2 years and I was the first one to write any sort of unit tests and to get the unit test infrastructure working. The difference in code quality is huge. There’s nothing like a legacy app with lots of bugs to show you just how important unit testing and regression testing are to maintaining a sane code base!

Click here to read my book review of PHPUnit Essentials.

For all projects where I use Emacs (I do use other IDEs like Intellij and Eclipse), I always try to write functionality in Emacs that improves my productivity. This is just one example. Another example is running the linting tools and deploying code to a remote server.