James Carr | Rants and Musings of an Agile Developer

Sep/12

9

Using Guard + PHPUnit for Great Good!

Another day, another post about the tooling I’ve been using to make PHP development bearable. Today I’ll share guard-phpunit, which I discovered thanks to a tip by @ctshryock.

I’ve been using this as a replacement for watchr which I use to autorun tests whenever I make code changes. I’ve switched to guard for a number of reasons, chief amongst them being the awesome notification support. You can use growl, libnotify and rb-notifu to notify test pass/fail.

Here’s the Guardfile I’ve been using. This is tailored for Zend Framework 2 so that whenever I modify a php class under a module directory it will run the tests for that particular class. Rapid feedback for the win!

No tags

1 comment

  • Admin comment by James Carr · September 9, 2012 at 9:41 am

    Only annoyance so far is that I tend to use a self bundled phpunit in composer for running my tests.

    Reply

Leave a Reply

<<

>>

Theme Design by devolux.nh2.me