<?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, 24 May 2012 16:00:44 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: How the Testing Sausage Gets Made]]></title>
      <guid>http://www.phpdeveloper.org/news/17970</guid>
      <link>http://www.phpdeveloper.org/news/17970</link>
      <description><![CDATA[<p>
For those either just getting into unit testing your applications (maybe even <a href="http://en.wikipedia.org/wiki/Test-driven_development">TDD</a>) or those that are old hat at it and what to figure out a few more tricks of the trade, you should check out <a href="http://www.littlehart.net/atthekeyboard/2012/05/17/how-the-testing-sausage-gets-made/">this latest post</a> from <i>Chris Hartjes</i> about some of the tools he uses to get the job done.
</p>
<blockquote>
So how does the Grumpy Programmer write code, TDD style? It starts with using a set of tools that reduce the amount of friction required. First, I do almost all my work from a terminal.  [...] Why the terminal? PHPUnit is a CLI application. Yes, many popular editors and IDE's can do things like execute PHPUnit for you, but they are limited in what flexibility they provide. 
</blockquote>
<p>
He also talks about his editor of choice, <a href="http://www.vim.org/">vim</a>, and some of the plugins he uses in his day to day testing development. This includes tools to handle things like interfacing with git/gists, working with ctags to see the code's structure, working with "surroundings" and the <a href="https://github.com/tpope/vim-pathogen">pathogen</a> plugin to make adding other plugins easier. He keeps the code up in one terminal and his testing tool (PHPUnit or other) accessible in a second, making it a simple matter of switching to write the test then the functionality to make it pass.
</p>
<blockquote>
If there is a lesson to be learned from this, it's to make sure that every tool that you use reduces the friction that is generated when building your application using TDD.
</blockquote>]]></description>
      <pubDate>Thu, 17 May 2012 09:19:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings techPortal: DPC Radio: TDD and Getting Paid]]></title>
      <guid>http://www.phpdeveloper.org/news/17798</guid>
      <link>http://www.phpdeveloper.org/news/17798</link>
      <description><![CDATA[<p>
On the Ibuildings techPortal site, they've posted the latest episode of their "DPC Radio" series (as recorded at the 2011 <a href="http://phpconference.nl">Dutch PHP Conference</a>) - <i>Rowan Merewood</i>'s session "<a href="http://techportal.ibuildings.com/2012/04/10/dpc-radio-tdd-and-getting-paid/">TDD and Getting Paid</a>".
</p>
<blockquote>
Test-driven development is generally regarded as a good move: it should result in simple decoupled design, your tests tend to cover behaviour not methods, and far fewer bugs. However, just getting unit tests in on a real, commercial project is hard - switching to TDD is even harder. [...] So, instead of beating ourselves up about not being perfect let's look at an interactive approach to adopting TDD principles. We'll look at tactics for selling TDD to your client, boss and colleagues. This talk will also cover methods for making TDD easier for you by showing you what tools you can use to integrate it into your development environment.
</blockquote>
<p>
You can listen to this new session recording through the <a href="http://techportal.ibuildings.com/2012/04/10/dpc-radio-tdd-and-getting-paid/">in-page player</a>, by <a href="http://dpcradio.s3.amazonaws.com/2011_017.mp3">downloading the mp3</a> or by <a href="http://feeds2.feedburner.com/ibuildingstechportal">subscribing to their feed</a>.
</p>]]></description>
      <pubDate>Tue, 10 Apr 2012 12:42:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Freek Lijten's Blog: Book Review - Growing Object-oriented software guided by tests]]></title>
      <guid>http://www.phpdeveloper.org/news/17661</guid>
      <link>http://www.phpdeveloper.org/news/17661</link>
      <description><![CDATA[<p>
<i>Freek Lijten</i> has <a href="http://www.freeklijten.nl/home/2012/03/10/Book-Review-Growing-Object-oriented-software-guided-by-tests">a new post</a> to his blog - a review of a book (from Freeman & Price) called "Growing Object-Oriented Software Guided by Tests". It's based on Java, but the ideas presented can be applied pretty universally.
</p>
<blockquote>
It may seem strange but I'd like to start out with giving my opinion on this book: It is brilliant! If you don't like reading my post you at least know what you should do next: buy the friggin' <a href="http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627">book</a>. The book offers some theory concerning agile development, (unit-)testing and code quality but its killer feature is the almost 200 page long example of developing an application the TDD way! In the rest of this post I will shortly highlight different parts of the books and stuff I enjoyed or learned from it.
</blockquote>
<p>
He breaks up the review in to a few different parts - the process of test-driven development, his "first real lesson", their working example and a section about the more advanced topic of sustainable test driven development.
</p>]]></description>
      <pubDate>Mon, 12 Mar 2012 13:57:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Testing your PHP Codebase with EnhancePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17431</guid>
      <link>http://www.phpdeveloper.org/news/17431</link>
      <description><![CDATA[<p>
On NetTuts.com today a new tutorial has been posted to help you test your applications and make it a simpler process <a href="http://net.tutsplus.com/tutorials/php/testing-your-php-codebase-with-enhancephp/">using the EnhancePHP framework</a>. <a href="http://www.enhance-php.com/">EnhancePHP</a> is a lightweight Open Source PHP <a href="http://www.enhance-php.com/Content/About-Unit-Testing/">unit testing</a> framework with support for <a href="http://www.enhance-php.com/Content/Mocks-And-Stubs/">mocks and stubs</a>.
</p>
<blockquote>
You know it; I know it. We should be testing our code more than we do. Part of the reason we don't, I think, is that we don't know exactly how. Well, I'm getting rid of that excuse today: I'm teaching you to test your PHP with the <a href="http://www.enhance-php.com/">EnhancePHP</a> framework.
</blockquote>
<p>
He shows you how to download it, get it installed and creates a simple structure to do some TDD (Test-Driven Development) with it. His tests check three things - valid email addresses, username restrictions and phone number formatting. He also includes a look at creating mocks/stubs for a "scoreboard" example.
</p>
<p>
You can find out more about the EnhancePHP framework on <a href="https://github.com/Enhance-PHP">its github page</a>.
</p>]]></description>
      <pubDate>Mon, 23 Jan 2012 09:25:45 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPUnit part 3]]></title>
      <guid>http://www.phpdeveloper.org/news/16782</guid>
      <link>http://www.phpdeveloper.org/news/16782</link>
      <description><![CDATA[<p>
<i>Michelangelo van Dam</i> is back today with the next part of his "Quality Assurance in PHP Projects" series, the <a href="http://www.dragonbe.com/2011/08/quality-assurance-on-php-projects_28.html">third part</a> of his look at <a href="http://phpunit.de">PHPUnit</a>, the popular PHP-based unit testing software.
</p>
<blockquote>
Time for the third part on unit testing with phpunit in my <a href="http://www.dragonbe.com/search/label/qaseries">Quality Assurance on PHP projects</a> series. In <a href="http://www.dragonbe.com/2011/08/quality-assurance-on-php-projects_17.html">part one</a> we started writing unit tests for a simple game of tic-tac-toe. In <a href="http://www.dragonbe.com/2011/08/quality-assurance-on-php-projects_23.html">part two</a> we started converting our unit tests into actual code and moved our general unit test code for grids into a Grid focussed unit test. In this part, we're looking at how we can optimize the tests for our players.
</blockquote>
<p>
He digs deeper into the TicTacToe application and focuses first on the single-player functionality, checking the symbol for the current player (an "X" or "O") and throwing exceptions in the code when things aren't right. He also shows the tests for checking on "more than one player" and "cannot add more than two players" scenarios. Full code for the Player class and tests are included.
</p>]]></description>
      <pubDate>Mon, 29 Aug 2011 09:18:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPUnit part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/16755</guid>
      <link>http://www.phpdeveloper.org/news/16755</link>
      <description><![CDATA[<p>
<i>Michelangelo van Dam</i> has posted the <a href="http://www.dragonbe.com/2011/08/quality-assurance-on-php-projects_23.html">second part of his look at PHPUnit</a> in his "Quality Assurance in PHP Projects" blog post series. This is a continuation from <a href="http://phpdeveloper.org/news/16730">part one</a>.
</p>
<blockquote>
I hope everyone enjoyed my <a href="http://www.dragonbe.com/2011/08/quality-assurance-on-php-projects_17.html">first article</a> on unit testing with <a href="http://phpunit.de/">phpunit</a> where I started writing a few tests that would guide us building our little game of tictactoe. Today I'm going start with turning these tests into working code and adjusting our tests to have a clear separation of responsibility. Since we already know what the code should produce, we only have to work out the details.
</blockquote>
<p>
He picks up where he left off on his "tic-tac-toe" example by defining some of the classes that will be needed to fulfill the tests and a sample test to check the generated grid's contents. He includes the Grid class that will do the job (full code included) and a full test case class that runs his example with checks on testGameGridIsSetAtStart, testGridCanPositionASymbol, testGridHasThreeSymbolsInARow and testGridHasThreeSymbolsInAColumn, some with their own data providers.
</p>]]></description>
      <pubDate>Tue, 23 Aug 2011 08:38:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Quality Assurance on PHP projects - PHPUnit part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/16730</guid>
      <link>http://www.phpdeveloper.org/news/16730</link>
      <description><![CDATA[<p>
<i>Michelangelo van Dam</i> continues his "Quality Assurance in PHP projects" series in his latest post, the first of a few, about <a href="http://www.dragonbe.com/2011/08/quality-assurance-on-php-projects_17.html">using PHPUnit to test your application</a>.
</p>
<blockquote>
Of all tools available for improving quality assurance, there's one tool that is the core tool you have to master: PHPUnit. PHPUnit is a complete testing framework crafted by Sebastian Bergmann (<a href="http://twitter.com/!#/s_bergmann">@s_bergmann</a>), who ported existing xUnit frameworks to PHP. And with this testing framework you're able to test your functionality in an automated way before you push code into production.
</blockquote>
<p>
<i>Michelangelo</i> walks you through the installation (via the PEAR installer), creating a phpunit.xml configuration file and making a basic bootstrapper to define some paths and environments. To make the tests a bit more relevant than just pseudo-test examples, he's created a set of tests based around a <a href="http://en.wikipedia.org/wiki/Tic-tac-toe">tic-tac-toe application</a> in a test-driven design fashion (tests first, then code). In this first part he sets up some of his assertions in the tests, but you'll have to wait until part 2 for the code that will make them pass.
</p>]]></description>
      <pubDate>Wed, 17 Aug 2011 10:02:33 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Building a client for a REST API with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16660</guid>
      <link>http://www.phpdeveloper.org/news/16660</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post to his blog showing how to <a href="http://gonzalo123.wordpress.com/2011/08/01/building-a-client-for-a-rest-api-with-php/">make a PHP-based client for a REST API</a> with the help of <a href="https://github.com/gonzalo123/GzaasApi">his handy tool</a>.
</p>
<blockquote>
Today we're going to create a library to use a simple RESTfull API for a great project called <a href="http://gzaas.com/">Gzaas</a>. [...] Ok. The API is a simple RESTfull <a href="http://gzaas.com/project/api-embed/api-general-overview/">API</a>, so we can use it with a simple curl interface. A few lines of PHP and it will run smoothly. But Gzaas is cool so we're going to create a cool interface too. This days I'm involved into TDD world, so we're going to create the API wrapper using TDD. Let's start.
</blockquote>
<p>
He starts with his tests, defining checks for fonts, patterns and styles and moves into a sample call that sets configuration options for background color, shadows and visibility. You can find out more about what the service has to offer by <a href="http://gzaas.com/project/api-embed">reading the documentation</a> and the client <i>Gonzalo</i> has written for it <a href="https://github.com/gonzalo123/GzaasApi">in github</a>.
</p>]]></description>
      <pubDate>Mon, 01 Aug 2011 11:57:40 -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[PHPBuilder.com: Four Sane Solutions for PHP Debugging]]></title>
      <guid>http://www.phpdeveloper.org/news/15388</guid>
      <link>http://www.phpdeveloper.org/news/15388</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a new article from <i>Jason Gilmore</i> sharing what he calls "four sane solutions" to help you debug your PHP applications better than just an <a href="http://php.net/echo">echo</a> or <a href="http://php.net/var_dump">var_dump</a>.
</p>
<blockquote>
Few tasks are more tedious and frustrating than debugging a Web application. [...] Fortunately, PHP developers have a number of powerful debugging solutions at their disposal. Whether you're merely inspecting array contents or attempting to determine the status of an Ajax-driven POST response, these four solutions are guaranteed to have an immediate impact on your productivity.
</blockquote>
<p>
His four solutions involve changing the error reporting level on your development environment higher than production to catch issues that might slip through unnoticed, using <a href="http://xdebug.org">XDebug</a>, integrating <a href="http://www.firephp.org/">FirePHP</a> and using <a href="http://www.webopedia.com/TERM/T/test_driven_development.html">test-driven development</a> to be sure things work from the outset.
</p>]]></description>
      <pubDate>Fri, 05 Nov 2010 08:41:28 -0500</pubDate>
    </item>
  </channel>
</rss>

