<?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>Fri, 24 May 2013 23:24:01 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[AjaxRay.com: Setting up Database testing with Kohana UnitTest module]]></title>
      <guid>http://www.phpdeveloper.org/news/15268</guid>
      <link>http://www.phpdeveloper.org/news/15268</link>
      <description><![CDATA[<p>
On the AjaxRay.com blog there's <a href="http://www.ajaxray.com/blog/2010/10/11/setting-up-database-testing-with-kohana-unittest-module/">a new post</a> showing you how to set up unit testing for your <a href="http://kohanaframework.org/">Kohana v3</a>-based application through PHPUnit.
</p>
<blockquote>
Kohana <a href="http://github.com/kohana/unittest">Unittest module</a> has made testing in <a href="http://kohanaframework.org/">Kohana v3</a> easy and fun. Lysender wrote a <a href="http://blog.lysender.com/2010/08/kohana-unit-testing-finally/">cool, straight forward post</a> about how to set it up and running. I'll just talk here about how I have set up database testing with Kohana Unittest for my personal use. Not saying "How to set up". Because it's obviously not the best way to do this.
</blockquote>
<p>
They walk you through the creation of the testing process - making "setup" and "tear down" SQL files, creating a "runSchema" method in a test case class and the code needed to run those setup/tear down files to refresh the database so there's no side effects of multiple tests using the same database.
</p>]]></description>
      <pubDate>Tue, 12 Oct 2010 13:29:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeff Moore's Blog: Closures (& Lambda Functions) are coming to PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12187</guid>
      <link>http://www.phpdeveloper.org/news/12187</link>
      <description><![CDATA[<p>
<i>Jeff Moore</i> has <a href="http://www.procata.com/blog/archives/2009/03/22/closures-are-coming-to-php/">a new post</a> showing an example of a feature that will be included in the upcoming PHP 5.3 release - closures/lambda functions.
</p>
<blockquote>
Dagfinn has a <a href="http://blog.agilephp.com/2009/03/19/real-programming-with-php-53-part-1-array-processing/">post</a> looking at using the new closure feature of PHP 5.3. He compares using foreach for iteration versus array_map. "Interesting," he concludes, "but not necessarily better than conventional alternatives." I agree for that case. Consider instead, a more complicated operation that requires a setup and a tear down after.
</blockquote>
<p>
<i>Jeff</i>'s example proposes that, instead of duplicating code, you use a lambda function to handle the custom parsing of the data as needed and pass that into the "doIt" function in his example.
</p>]]></description>
      <pubDate>Mon, 23 Mar 2009 11:14:18 -0500</pubDate>
    </item>
  </channel>
</rss>
