<?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, 12 Feb 2012 20:19:44 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ibuildings techPortal: Beyond TDD with PHPSpec]]></title>
      <guid>http://www.phpdeveloper.org/news/16667</guid>
      <link>http://www.phpdeveloper.org/news/16667</link>
      <description><![CDATA[<p>
On the Ibuildings techPortal today there's a new post from <i>Marcello Duarte</i> following up on his previous post looking at behavior driven development (<a href="http://phpdeveloper.org/news/16640">here</a>) with <a href="http://techportal.ibuildings.com/2011/08/03/outside-in-behaviour-driven-development-in-php-part-2/">a look at PHPSpec</a>, a <a href="http://www.phpspec.net/">port of RSpec</a> that is the first PHP BDD framework.
</p>
<blockquote>
<a href="http://www.phpspec.net/">PHPSpec</a> is the first ever PHP BDD framework. It is a port of <a href="http://rspec.info/">RSpec</a> to PHP created back in 2007 by Padraic Brady and Travis Swicegood. Development in this framework stopped for a while and was reignited last August (2010).
</blockquote>
<p>
He goes over how to get it installed via PEAR and how to write some sample tests following along the topic from his previous post (handing videos and reviews). He gets into a bit more detail by describing how MVC is handled with PHPSpec and how the Zend Framework command line tool can be used to create a controller that satisfies the test.
</p>]]></description>
      <pubDate>Wed, 03 Aug 2011 09:41:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Label Media Blog: Test Driven Development with PHPUnit]]></title>
      <guid>http://www.phpdeveloper.org/news/15532</guid>
      <link>http://www.phpdeveloper.org/news/15532</link>
      <description><![CDATA[<p>
New on the Label Media blog today <i>Sam Holman</i> has posted his <a href="http://www.labelmedia.co.uk/blog/posts/test-driven-development-with-phpunit.html">introductory look at doing Test Driven Development</a> (TDD) with the help of the popular PHP unit testing tool <a href="http://phpunit.de">PHPUnit</a>.
</p>
<blockquote>
I couldn't find any recent surveys looking into the percentage of software development teams that make use of TDD, but i'd hazard a guess that it's probably not as high as it perhaps should be. I think there are a number of reasons for this, but it's primarily all about the people. The technologies are here, you've just got to start using them - which begins by understanding why they should be used. [...] There are a number of test frameworks for PHP, the biggest of which are probably <a href="http://www.phpunit.de/">PHPUnit</a> and <a href="http://www.simpletest.org/">SimpleTest</a>. My preference is for PHPUnit, which is the one I'll be using here.
</blockquote>
<p>
He walks you through the basics first - installation of PHPUnit from its PEAR channel and setting up some basics tests. From there he moves into the TDD-ness stage, creating a sample class to test the getting and setting of values from a configuration class. He also provides the class that's something like your end result should be.
</p>]]></description>
      <pubDate>Fri, 03 Dec 2010 08:46:26 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: The Newbie's Guide to Test-Driven Development]]></title>
      <guid>http://www.phpdeveloper.org/news/14973</guid>
      <link>http://www.phpdeveloper.org/news/14973</link>
      <description><![CDATA[<p>
On NETTUTS.com today there's <a href="http://net.tutsplus.com/tutorials/php/the-newbies-guide-to-test-driven-development/">a new tutorial</a> to help you get started with effective test-driven development in your PHP applications with SimpleTest.
</p>
<blockquote>
Testing your code is annoying, but the impact of not doing so can be orders of magnitude more annoying! In this article, we'll use test-driven development to write and test our code more effectively.
</blockquote>
<p>
They start with the basics - what test-driven development is, why it's a good idea and how the whole process works to improve your code. They opt for a bit simpler route for their testing tool and chose <a href="http://www.simpletest.org/">SimpleTest</a>. They show you how to set it up and where to start. In order for TDD to work, you really have to plan out your application so you know what you're testing. They give you an example of a simple script and how to start from failing tests to a working app.
</p>]]></description>
      <pubDate>Tue, 17 Aug 2010 11:40:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Web Builder Zone: Zend_Test for Acceptance TDD]]></title>
      <guid>http://www.phpdeveloper.org/news/14552</guid>
      <link>http://www.phpdeveloper.org/news/14552</link>
      <description><![CDATA[<p>
On the Web Builder Zone (of <a href="http://dzone.com">DZone</a>) <i>Giorgio Sironi</i> has posted an article looking at the <a href="http://framework.zend.com/manual/en/zend.test.html">Zend_Test</a> component of the Zend Framework and how to use it for <a href="http://css.dzone.com/news/acceptance-test-driven">acceptance test-driven development</a>.
</p>
<blockquote>
Acceptance Test-Driven Development is an Agile technique that extends the test-first approach to the development of the front end of an application. The mechanics of Acceptance TDD are clear: first you write a test which defines the goal of your development, which is basically the feature you're adding to your application. As with all TDD variants, this test must fail.
</blockquote>
<p>
With the help of the Zend_Test component, your tests can execute through the full MVC stact of your application (including views) to check to see if the resulting content matches certain criteria. He includes a few code examples showing content searching (contains), validating the query string and checking for a redirect.
</p>]]></description>
      <pubDate>Tue, 25 May 2010 09:29:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Xebee Blog: Test Driven Development with Zend Framework and PHPUnit ]]></title>
      <guid>http://www.phpdeveloper.org/news/13984</guid>
      <link>http://www.phpdeveloper.org/news/13984</link>
      <description><![CDATA[<p>
On the Xebee blog there's a recent post looking at <a href="http://xebee.xebia.in/2010/02/05/test-driven-development-with-zend-framework-and-phpunit/">test-driven development with the Zend Framework</a> and <a href="http://phpunit.de">PHPUnit</a>. They show how they work well together and make it simpler to use TTD to create and test your applications.
</p>
<blockquote>
Over the past few days I was going through the Zend Framework reference docs and I found myself pleasantly surprised with all that the latest version of this web application framework provides. [...] Out of the many new features, what stood out for me was the ease with which Zend Framework and PHPUnit complement and work with each other.
</blockquote>
<p>
He talks about some of the features of PHPUnit (including dependencies, testing for exceptions and errors) and how it fits into a good deployment strategy. He shows how you can use the Zend_Test component of the framework, along with the Zend_Test_PHPUnit features, to make a sample test case. There's also an example of using the Zend_Test_PHPUnit_Db component to test database information and your backend data stores to compare them to a formatted XML document.
</p>]]></description>
      <pubDate>Mon, 08 Feb 2010 12:05:05 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Priebsch's Blog: TDD in a self-experiment]]></title>
      <guid>http://www.phpdeveloper.org/news/10489</guid>
      <link>http://www.phpdeveloper.org/news/10489</link>
      <description><![CDATA[<p>
<i>Stefan Priebsch</i> has posted <a href="http://inside.e-novative.de/archives/121-TDD-in-a-self-experiment.html">an overview</a> of some of his experiences with test-driven development in PHP. Specifically, he talks about it in the context of a small CMS he's been working up.
</p>
<blockquote>
The CMS I am using is a small engine that puts together (potentially multi-lingual) page content, templates, and a site structure, and creates semi-static pages. It does not have a sleek GUI frontend, because by nature I am not afraid of a text editor, and most of the time get quicker results by just writing HTML than fighting with one of these what-you-see-is-what-you-might-get HTML editors.
</blockquote>
<p>
He talks about the configuration files containing the app's settings (inspired by the YAML Symfony uses) and his work towards the "best matching pattern" algorithm. This is where the TDD came in - he cheated a little with some base classes (tests first!) and then came up with the tests for checking template names and more complex template interactions.
</p>
<p>
<a href="http://inside.e-novative.de/archives/121-TDD-in-a-self-experiment.html">The post</a> includes drops of code here and there as well - examples of the unit tests and of the configuration files.
</p>]]></description>
      <pubDate>Thu, 26 Jun 2008 07:57:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Padraic Brady's Blog: The PHPSpec Zend Framework App Testing Manifesto: Preamble]]></title>
      <guid>http://www.phpdeveloper.org/news/9416</guid>
      <link>http://www.phpdeveloper.org/news/9416</link>
      <description><![CDATA[<p>
<i>Padraic Brady</i> has <a href="http://blog.astrumfutura.com/archives/335-The-PHPSpec-Zend-Framework-App-Testing-Manifesto-Preamble.html">posted a manifesto</a> of sorts about the work that he's been doing on his <a href="http://dev.phpspec.org/manual/en">PHPSpec</a> library and trying to work it into the approval process for the Zend Framework.
</p>
<blockquote>
I'll be attempting to pound the Zend Framework into submission so I can apply Behaviour-Driven Development (BDD) using <a href="http://dev.phpspec.org/manual/en">PHPSpec</a> when I write a Controller. Why? Because I feel like it, and it gives me an excuse to promote one possible incarnation of PHPMock and the PHPSpec Zend Framework extension. See? Perfectly reasonable selfishness!
</blockquote>
<p>
He hopes to move it past the typical test-driven development process that PHPUnit offers and "kick your ass into high-TDD gear" without having to have worked much with it before then (the key is simplicity).
</p>
<p>
He includes some code examples (how it should flow) and describes some of the challenges that he's coming across so far, specifically with the way that the Zend Framework works with the Controllers and what he wants to accomplish.
</p>]]></description>
      <pubDate>Mon, 14 Jan 2008 10:22:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Speaking at Conference PHP Quebec 2008]]></title>
      <guid>http://www.phpdeveloper.org/news/9052</guid>
      <link>http://www.phpdeveloper.org/news/9052</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> <a href="http://sebastian-bergmann.de/archives/718-Speaking-at-Conference-PHP-Quebec-2008.html">points out</a> that he will be speaking at the upcoming PHP Conference in Quebec (2008). He will be presenting three talks/tutorials:
</p>
<ul>
<li>Test-Driven Object-Oriented Programming - Learning and Understanding (with Marcus Borger): This PHPLab is an in-depth introduction to object-oriented and pattern-based programming using PHP 5. You will learn everything necessary to write your own cutting-edge components and applications - and of course how to use and extend components from other people or companies.
<li>PECL: The PHP Language Workbench: A look into PECL shows how flexible the language core of PHP, the Zend Engine, is. 
<li>Graph-Oriented Programming with PHP: This session presents the eZ Components' workflow engine, its possible applications and the underlying principles and techniques.
</ul>
<p>
You can find out more about the conference from <a href="http://conf.phpquebec.com/en/">their main website</a> (including other speakers that will be presenting) as well as <a href="http://conf.phpquebec.com/en/tarif">registering</a> to reserve your space for the March 12th-14th conference.
</p>]]></description>
      <pubDate>Thu, 15 Nov 2007 11:13:00 -0600</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>
    <item>
      <title><![CDATA[Dagfinn Reiersol's Blog: Fake it and raise your IQ]]></title>
      <guid>http://www.phpdeveloper.org/news/7277</guid>
      <link>http://www.phpdeveloper.org/news/7277</link>
      <description><![CDATA[<p>
On the "PHP in Action" blog, <i>Dagfinn Reiersol</i> has <a href="http://www.reiersol.com/blog/index.php?op=ViewArticle&articleId=13&blogId=1">posted some ideas</a> about developing PHP applications (really, any applications) from scratch - by faking it.
</p>
<blockquote>
<p>
So  where and how on earth do you  start?  Let's say we know one thing about the result; call it the known fact. Do we start by  making educated guesses about what should be in the black box? A lot of development is like that.
</p>
<p>
Enough of this philosophical mumbo-jumbo; what does it mean in practice? Well, it's test-driven development, and more specifically, it's what Kent Beck calls the Fake It patttern. You implement a test for the result, then you hard code the result. It's an absolutely weird idea that's magical in its effect because it get you started. And as the German expression goes, aller Anfang ist schwer--all beginnings are difficult.
</p>
</blockquote>
<p>
He <a href="http://www.reiersol.com/blog/index.php?op=ViewArticle&articleId=13&blogId=1">illustrates the point</a> with a set of code examples - one side being the unit test (written first, of course) and the other the actual code. All it does is set a URL to a variable inside a class, but the point is made. </p>
<p>
Starting at the high level is good when you know the full scope of the project, but that's not always a possibility. This is a good alternative to getting started without causing too many issues down the road.
</p>]]></description>
      <pubDate>Wed, 14 Feb 2007 10:33:00 -0600</pubDate>
    </item>
  </channel>
</rss>

