<?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, 05 Jul 2008 06:11:23 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Testing Zend Framework MVC Applications]]></title>
      <guid>http://www.phpdeveloper.org/news/10521</guid>
      <link>http://www.phpdeveloper.org/news/10521</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> has <a href="http://weierophinney.net/matthew/archives/182-Testing-Zend-Framework-MVC-Applications.html">posted about</a> a project he undertook to make it simple to test "userland projects" built with the Zend Framework as easy to test as the framework's own Front Controller and Dispatcher.
</p>
<blockquote>
One of my ongoing projects the past few months has been to create an infrastructure for functional testing of ZF projects using <a href="http://phpunit.de/">PHPUnit</a>. This past weekend, I made the final commits that make this functionality feature complete. 
</blockquote>
<p>
This new functionality allows you to create stub test case classes, use a Zend_Dom_Query object with CSS selectors/XPath for queries and makes available a special PHPUnit test case that handles the interface between some of the custom functionality (boostrapping, dispatching requests, etc) and PHPUnit.
</p>
<p>
He includes a sample test case that has assertions for calls to a controller with an action, that a page contains a login form and that a page creates a session and redirects to a profile page.
</p>
<p>
You can get this functionality <a href="http://framework.zend.com/svn/framework/standard/incubator/">from the incubator</a> on the subversion repository for the project.
</p>]]></description>
      <pubDate>Tue, 01 Jul 2008 12:05:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Global Variables and PHPUnit]]></title>
      <guid>http://www.phpdeveloper.org/news/10424</guid>
      <link>http://www.phpdeveloper.org/news/10424</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has a <a href="http://sebastian-bergmann.de/archives/797-Global-Variables-and-PHPUnit.html">new post</a> today about a feature of the PHPUnit unit testing tool that has the possibility of breaking when objects are introduced - backing up the globals.
</p>
<blockquote>
It is hard to test code that uses singletons. The same is true for code that uses global variables. Typically, the code you want to test is coupled strongly with a global variable and you cannot control its creation. An additional problem is the fact that one test's change to a global variable might break another test.
</blockquote>
<p>
You can disable the backup option if you'd like by setting the $backupGlobals option in your test to false. This lets PHPUnit know that you want to leave the globals (and superglobals) alone during the run.
</p>]]></description>
      <pubDate>Tue, 17 Jun 2008 08:49:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ken Guest's Blog: Book review: PHP Objects, Patterns and Practice (second edition)]]></title>
      <guid>http://www.phpdeveloper.org/news/10334</guid>
      <link>http://www.phpdeveloper.org/news/10334</link>
      <description><![CDATA[<p>
<i>Ken Guest</i> has <a href="http://blogs.linux.ie/kenguest/2008/06/03/book-review-php-objects-patterns-and-practice-second-edition/">posted a review</a> of yet another PHP-related book from APress publishing, "PHP Objects, Patterns and Practice (Second Edition)".
</p>
<blockquote>
While being an easy read, this is a well written, serious book and is aimed squarely at enterprise-level developers and software engineers who make their living through the development and architecture of solutions developed in PHP.
</blockquote>
<p>
He <a href="http://blogs.linux.ie/kenguest/2008/06/03/book-review-php-objects-patterns-and-practice-second-edition/">breaks down</a> the book into the three sections its title mentions - working with objects, design patterns and a healthy dose of PEAR, phpDocumentor, PHPUnit, CVS and phing.
</p>]]></description>
      <pubDate>Wed, 04 Jun 2008 07:58:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Kimsal's Blog: Forget SEO - what about Test Optimization?]]></title>
      <guid>http://www.phpdeveloper.org/news/10327</guid>
      <link>http://www.phpdeveloper.org/news/10327</link>
      <description><![CDATA[<p>
In a <a href="http://michaelkimsal.com/blog/forget-seo-what-about-test-optimization/">new post</a> today, <i>Michael Kimsal</i> walks through the procoess he followed to try and get the most optimized testing environment he could around a <a href="http://www.wordpress.org">WordPress</a> installation he already has set up.
</p>
<blockquote>
I've recently been working on a project trying to take an existing customized wordpress site and create automated integration tests around parts of it.  I'm using <a href="http://www.phpundercontrol.org/">phpUnderControl</a>, <a href="http://www.phpunit.de/">phpUnit</a>, <a href="http://selenium-rc.openqa.org/">Selenium RC</a>, <a href="http://www.getfirefox.com/">Firefox</a>, <a href="http://en.wikipedia.org/wiki/Xvfb">Xvfb</a> (virtual frame buffer) and...well, I think that's it.
</blockquote>
<p>
He mentions the two issues he came across, both with the WordPress software (the "siteurl" setting and the pathing for the templates). He recommends that application code be portable to avoid problems like these. Applications that can be dropped in anywhere and "just work" can help not only make life easier for the installer but also for the tester.
</p>]]></description>
      <pubDate>Tue, 03 Jun 2008 08:49:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: Unit Tests and Code Coverage with PHPT]]></title>
      <guid>http://www.phpdeveloper.org/news/10263</guid>
      <link>http://www.phpdeveloper.org/news/10263</link>
      <description><![CDATA[<p>
<i>Matthew Turland</i> has <a href="http://ishouldbecoding.com/2008/05/23/unit-tests-and-code-coverage-with-phpt">posted about</a> some of his experience with <a href="http://qa.php.net/write-test.php">PHPT</a> tests with <a href="http://phpunit.de/">PHPUnit</a>.
</p>
<blockquote>
Recently, I wrote some for a project and realized that I wasn't aware of how to generate code coverage reports. Many thanks to the very helpful patrons in the #pear channel on EFNet for helping me to get this working.
</blockquote>
<p>
He <A href="http://ishouldbecoding.com/2008/05/23/unit-tests-and-code-coverage-with-phpt">show his setup process</a> (on Kubuntu) - grabbing the PEAR package, installing it and how to get a runner script to integrate the PHPT testing into PHPUnit.
</p>]]></description>
      <pubDate>Mon, 26 May 2008 07:54:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tillate.com Blog: Unit test practice at tilllate.com]]></title>
      <guid>http://www.phpdeveloper.org/news/10164</guid>
      <link>http://www.phpdeveloper.org/news/10164</link>
      <description><![CDATA[<p>
<i>Silvan Muhlemann</i> has <a href="http://techblog.tilllate.com/2008/05/11/unit-test-practice-at-tilllatecom/">posted about</a> the unit testing that tillate.com does for their releases - the whole process from start to finish.
</p>
<blockquote>
For now over three years we are working with unit tests. I'd like to share some of those experiences. As we have two frameworks in place for our website, I can compare two different strategies for unit tests.
</blockquote>
<p>
He <a href="http://techblog.tilllate.com/2008/05/11/unit-test-practice-at-tilllatecom/">talks about</a> their choice of SimpleTest, their test monitoring, CruiseControl and their "if it doesn't pass, you can't release it" mentality to keep their site as bug free as possible.
</p>]]></description>
      <pubDate>Mon, 12 May 2008 15:46:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Priebsch's Blog: PHPUnit test and Code Coverage Statistics with phing]]></title>
      <guid>http://www.phpdeveloper.org/news/10017</guid>
      <link>http://www.phpdeveloper.org/news/10017</link>
      <description><![CDATA[<p>
<i>Stefan Priebsch</i> has posted <a href="http://inside.e-novative.de/archives/114-PHPUnit-test-and-Code-Coverage-Statistics-with-phing.html">an example</a> of how he uses PHPUnit "manually" to reduce the overhead (and added complexity) of calling <a href="http://phing.info/trac/">phing</a>.
</p>
<blockquote>
Instead of instantiating PHPUnit from phing, I use the command line interface to call PHPUnit. This decouples phing and PHPUnit, which should cause less problems with version updates in the future. To configure PHPUnit, phing creates a temporary XML configuration file which is deleted after PHPUnit has finished.
</blockquote>
<p>
The source is <a href="http://inside.e-novative.de/archives/114-PHPUnit-test-and-Code-Coverage-Statistics-with-phing.html">included in the post</a> - it manually builds the XML file needed for phing to do its job.
</p>]]></description>
      <pubDate>Tue, 22 Apr 2008 14:15:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Test Runner Improvement in PHPUnit 3.3]]></title>
      <guid>http://www.phpdeveloper.org/news/9956</guid>
      <link>http://www.phpdeveloper.org/news/9956</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has posted some details about <a href="http://sebastian-bergmann.de/archives/772-Test-Runner-Improvement-in-PHPUnit-3.3.html">an update</a> that's been made to the test runner for the PHPUnit (3.3) unit testing suite - an allowance for directories instead of just files on the command line.
</p>
<blockquote>
Given a directory, the test runner will recursively scan the directory for *Test.php files, build a test suite out of the *Test classes, and run it.
</blockquote>
<p>
<a href="http://www.phpunit.de/">PHPUnit</a> is framework that makes writing tests for your code easy and also includes functionality to run the tests and analyze their results.
</p>]]></description>
      <pubDate>Fri, 11 Apr 2008 09:46:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: ANSI Colors in PHPUnit Output]]></title>
      <guid>http://www.phpdeveloper.org/news/9829</guid>
      <link>http://www.phpdeveloper.org/news/9829</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> <a href="http://sebastian-bergmann.de/archives/761-ANSI-Colors-in-PHPUnit-Output.html">shows off</a> a new feature of the latest PHPUnit release - the addition of ANSI colors to the runner's output.
</p>
<p>
Check out the screenshots <a href="http://www.flickr.com/photos/sebastian_bergmann/2340283723/">here</a> and <a href="http://www.flickr.com/photos/sebastian_bergmann/2340283719/">here</a>.
</p>
<p>
PHPunit is a member of the xUnit family of testing frameworks and provides both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results.
</p>]]></description>
      <pubDate>Thu, 20 Mar 2008 10:26:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Generating Code from Tests]]></title>
      <guid>http://www.phpdeveloper.org/news/9788</guid>
      <link>http://www.phpdeveloper.org/news/9788</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has <a href="http://sebastian-bergmann.de/archives/756-Generating-Code-from-Tests.html">posted a quick example</a> of how to use the <a href="http://www.phpunit.de/">PHPUnit</a> unit testing suite for PHP to create code for you (assuming you're using the <a href="http://www.phpunit.de/pocket_guide/3.3/en/test-first-programming.html">test first</a> method of development.
</p>
<p>
His example builds the class off of a set of test for a "BowlingGame" that ends up with roll() and score() methods based off of the naming conventions used in the test:
</p>
<blockquote>
Following the convention that the tests for a class BowlingGame (see below) are written in a class named BowlingGameTest (see above), the test case class' source is searched for variables that reference objects of the BowlingGame class and analyzing what methods are called on these objects.
</blockquote>]]></description>
      <pubDate>Thu, 13 Mar 2008 08:43:50 -0500</pubDate>
    </item>
  </channel>
</rss>
