<?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>Sun, 06 Jul 2008 16:53:40 -0500</pubDate>
    <ttl>30</ttl>
    <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>
