<?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>Thu, 20 Jun 2013 01:26:37 -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>
    <item>
      <title><![CDATA[Paul Jones' Blog: TDD, Test-First, and Ravioli Code]]></title>
      <guid>http://www.phpdeveloper.org/news/8272</guid>
      <link>http://www.phpdeveloper.org/news/8272</link>
      <description><![CDATA[<p>
With test-driven development being promoted as one thing that can help encourage better coding, most developers are looking into its use and how it can help. <i>Paul Jones</i> takes an opposite approach, though, and looks at how it <a href="http://paul-m-jones.com/blog/?p=250">could cause "ravioli code"</a> in an application.
</p>
<blockquote>
I know that test-first and <a href="http://en.wikipedia.org/wiki/Test-driven_development">test-driven development (TDD)</a> are popular methodologies these days, but something about those processes has always met with a level of mental resistance from me. Even though it sounds good in theory, I have been intuitively wary of the "test-first" mentality for some reason. My own approach is closer "remember to code so you can test it later" and then "test-last" after the API is mostly stable.
</blockquote>
<p>
He <a href="http://paul-m-jones.com/blog/?p=250">includes quotes</a> from Slashdot comment quotes from <a href="http://developers.slashdot.org/comments.pl?sid=236721&cid=19326041">AuMatar</a> and <a href="http://developers.slashdot.org/comments.pl?sid=236721&cid=19330355">dkf</a>. Be sure to check out the comments on the post (17 of them at the time of this posting) for some opinions from others about test-driven development and how it can affect your code.
</p>
<p>
Blogs also mentioning this discussion:
</p>
<ul>
<li><a href="http://www.reiersol.com/blog/index.php?op=ViewArticle&articleId=22&blogId=1">PHP in Action</a>
<li><a href="http://paul-m-jones.com/blog/?p=251">another post</a> from <i>Paul</i> on some of the responses
</ul>]]></description>
      <pubDate>Wed, 18 Jul 2007 08:43:00 -0500</pubDate>
    </item>
  </channel>
</rss>
