<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 13:44:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[NetTuts.com: Automatic Testing for TDD with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18400</guid>
      <link>http://www.phpdeveloper.org/news/18400</link>
      <description><![CDATA[<p>
If you practice the TDD (test-driven development) methodology in your work, you know that sometimes switching back and forth between a terminal and your IDE can be distracting. In <a href="http://net.tutsplus.com/tutorials/php/automatic-testing-for-tdd-with-php/">this new tutorial</a> from NetTuts.com, they show you how to streamline things a bit with a simple Ruby script.
</p>
<blockquote>
Traditional test-driven development can, at times, be cumbersome. You have to stop writing code in order to run your tests. Luckily, there are solutions, which provide the ability to automatically run your tests as you code. In this tutorial, you will learn how to use a Ruby gem, called watchr, to monitor your code and automatically run the appropriate tests whenever you save your work.
</blockquote>
<p>
The IDE doesn't matter in this case because the "watchr" tool keeps an eye on when things change in the watched directory and automatically fires off a script when it sees an update. They include the few short lines of Ruby to make it all happen and even have the "notify-send" command built in to give you a popup about the pass/fail status.
</p>]]></description>
      <pubDate>Fri, 24 Aug 2012 09:09:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[AppBackr Blog: Automated PHP unit testing for lazy coders]]></title>
      <guid>http://www.phpdeveloper.org/news/16664</guid>
      <link>http://www.phpdeveloper.org/news/16664</link>
      <description><![CDATA[<p>
In a recent post from the AppBackr blog they share a solution they've found for running unit tests automatically <a href="http://geeks.appbackr.com/61971101">for lazy coders</a> using a combination of PHPUnit, Watchr and Growl notifications (OS X-only, obviously).
</p>
<blockquote>
Now you could run [your] tests manually after each change by typing 'phpunit <your test folder>', but we were looking for something a little more comfortable. We want to decrease the transactional cost of running the tests as much as possible to make the lives of our engineers more pleasant. Making testing easy is the only way the engineers will run the tests frequently.
</blockquote>
<p>
Instead they opted for <a href="https://github.com/mynyml/watchr">Watchr</a>, a tool that keeps an eye on a list of files looking for a change. When one happens, a process is fired off - in this case a PHPUnit run. To make it even easier to see feedback, they integrated it with <a href="http://growl.info/">Growl</a> to show <a href="http://posterous.com/getfile/files.posterous.com/temp-2011-07-21/aGCnenemtzIzodDbvkeCAuyEHyyepnmCIBwovsrlFohtrgJkehawphtHIpGk/test_succeeded.png.scaled500.png">pass</a> or <a href="http://posterous.com/getfile/files.posterous.com/temp-2011-07-21/digwcGCjjfvoxiHkwFCkkgshJHHBmhejDozyrAgsxsHdeCImhqncdiEJzlIm/test_failed.png.scaled500.png">fail</a> results. He includes the <a href="https://github.com/appbackr/watchr-phpunit-yii-config">source for his Watchr script</a> to help you get started.
</p>]]></description>
      <pubDate>Tue, 02 Aug 2011 10:41:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Olek Janiszewski's Blog: Autotest-like PHPUnit runner for a Zend Framework application]]></title>
      <guid>http://www.phpdeveloper.org/news/15044</guid>
      <link>http://www.phpdeveloper.org/news/15044</link>
      <description><![CDATA[<p>
On the Continuous Development blog there's <a href="http://exviva.posterous.com/autotest-like-phpunit-runner-for-a-zend-frame">a new post</a> showing how <i>Olek Janiszewski</i> came up with a solution to integrate PHPUnit and the Zend Framework via the <a href="http://github.com/mynyml/watchr">watchr</a> Ruby gem.
</p>
<blockquote>
Whenever working on a Ruby project, I'd run autotest with test_notifier to get immediate feedback on my code. Unfortunately, I don't know a similar utility integrated with Zend Framework and PHPUnit. [...] My solution is not as well designed and portable as test_notifier, and it doesn't play as nicely with my Zend application as autotest does with RSpec and Rails. It's more of a quick hack to cover my needs 80% of the time.
</blockquote>
<p>
The watchr gem changes to the correct directory and runs the usual PHPUnit command (to run all tests) and then captures the output to display back to the client. You end up with messages like these: <a href="http://posterous.com/getfile/files.posterous.com/temp-2010-08-28/wybABroJlrboozuaxFlAAugzpBEfubzmhnrCcnegmGdHsotFFipcrkAcCeHC/success.png">success</a>, <a href="http://posterous.com/getfile/files.posterous.com/temp-2010-08-28/hszsJhelJtyCjqIlytEmeiGImxEJzodHEuyJEqkdHFAxICxjDHFdjnytGgfo/skipped.png">warning</a> and <a href="http://posterous.com/getfile/files.posterous.com/temp-2010-08-28/HybdICaAkqmlAjDoaAwiihsgGCgEqAfpelEIBHnpabHFtqHigBCvkwuFAkbw/fatal.png">fatal errors</a>.
</p>]]></description>
      <pubDate>Mon, 30 Aug 2010 13:25:43 -0500</pubDate>
    </item>
  </channel>
</rss>
