<?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>Sat, 18 May 2013 17:43:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Matthew Weir O'Phinney's Blog: Automating PHPUnit2 with SPL]]></title>
      <guid>http://www.phpdeveloper.org/news/5133</guid>
      <link>http://www.phpdeveloper.org/news/5133</link>
      <description><![CDATA[<i>Matthew Weir O'Phinney</i> has been working with PHPUnit and the SPL (Standard PHP Library) in PHP for a bit now, and he's discovered a way to integrate the two to automate the testing procedure.
<p>
<quote>
<i>
I've actually come to enjoy the PHPUnit2 style of tests. In the end, I find that my tests are much less verbose than the way I was performing them with phpt, and I tend to test for failure rather than success; failure should be the exception to the rule. The myriad of 'assert' methods make this relatively easy (though some operate in unexpected ways -- try testing assertSame() on two objects that contain PDO handles, for instance).
<p>
One thing that was missing for me was an easy way to run all tests in a directory, ala 'pear run-tests'. However, I was initially disappointed. The demonstrated way to do this is to manually require each test file and add the class contained therein to the test suite. Basically, I was going to need to touch the file every time I added a test class to the suite. Bleh!
</i>
</quote>
<p>
So, he <a href="http://weierophinney.net/matthew/archives/106-Automating-PHPUnit2-with-SPL.html">set about</a> working up his own solution - a regular expresion-based, recursive class that would locate the testing files and perform the specified actions. He shares the solution with a good bit of example code included with the post.]]></description>
      <pubDate>Mon, 10 Apr 2006 07:10:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Stocker's Blog: Visual Code Coverage with SimpleTest]]></title>
      <guid>http://www.phpdeveloper.org/news/4613</guid>
      <link>http://www.phpdeveloper.org/news/4613</link>
      <description><![CDATA[On <i>Christian Stocker</i>'s blog today, there's <a href="http://blog.bitflux.ch/archive/2006/01/05/visual-code-coverage-with-simpletest.html">his experience</a> with testing his code coverage visually with the help of the SimpleTest framework.
<p>
<quote>
<i>
For our CMS, we use <a href="http://~/clients/fluxcms_1_3/inc/bx/tests">SimpleTest</a> as testing framework. We used it in other projects, and as you should never change a running team, we sticked to that for Flux CMS as well.
<p>
But one thing I saw over at <a href="http://www.phpunit.de/">PHPUnit2</a> and badly wanted to have, was the <a href="http://www.phpunit.de/pocket_guide/2.3/en/code-coverage-analysis.html">Code-Coverage Analysis</a>. The pure coverage data comes from Xdebug PHPUnit2 "just" displays it nicely based on that. A quick look into the code revealed that it was easy to just use the CodeCoverage classes and so I integrated it in our testing framework.
</i>
</quote>
<p>
He <a href="http://blog.bitflux.ch/archive/2006/01/05/visual-code-coverage-with-simpletest.html">gives his example</a> of how the code coverage looks, and gives the eight lines of code that it took to implement it - nice and simple...
]]></description>
      <pubDate>Thu, 05 Jan 2006 07:09:11 -0600</pubDate>
    </item>
  </channel>
</rss>
