News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michelangelo van Dam's Blog:
Quality Assurance on PHP projects - PHPUnit part 4
September 05, 2011 @ 08:34:44

Michelangelo van Dam has posted the fourth part of his "Quality Assurance in PHP projects" series to his blog today - a continuation of his emphasis on PHPUnit and testing his sample "Tic-Tac-Toe" game.

In parts one, two and three we focussed on writing tests for a game of tic-tac-toe, with in parts two and three we optimized our tests so they focus on the functionality of the individual parts Grid and Player, with a collection class Players to handle Player objects.

In this fourth part he focuses on the rules for playing the game and the unit tests to validate the correct flow. He covers one of his tests before, looking at the "can be played" validation for identical symbols. He modifies this to use a provider that gives the test the set of data to work from with varying symbols. He writes additional tests to be sure the game "stops after winning" and that it has a winner/which player is the winner. You can find the full game source (complete with these tests) on his github account.

0 comments voice your opinion now!
phpunit quality assurance project unittest


blog comments powered by Disqus

Similar Posts

Jani Hartikainen: Parsing and evaluating PHP in Haskell: Part 1

Marcelo Gornstein's Blog: Unit test your PHP IVR applications with PAGI

Michael Nitschinger's Blog: A primer on PHP exceptions

Kore Nordmann's Blog: PHP quality assurance tools

Zend Developer Zone: Zend Framework application's PHPUnit suite 3x faster


Community Events

Don't see your event here?
Let us know!


configure library introduction laravel framework application symfony2 community release opinion php7 podcast example conference part2 interview api voicesoftheelephpant series performance

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework