News Feed
Sections




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

Label Media Blog:
Test Driven Development with PHPUnit
December 03, 2010 @ 08:46:26

New on the Label Media blog today Sam Holman has posted his introductory look at doing Test Driven Development (TDD) with the help of the popular PHP unit testing tool PHPUnit.

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 PHPUnit and SimpleTest. My preference is for PHPUnit, which is the one I'll be using here.

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.

0 comments voice your opinion now!
phpunit testdriven development tdd introduction unittest


blog comments powered by Disqus

Similar Posts

Sebastian Bergmann's Blog: PHPUnit and Cyclomatic Complexity

James Morris: PHPUnit Mocking and Method Chaining

Sebastian Nohn\'s Blog: Continuous Builds with CruiseControl, Ant and PHPUnit

Damian Sromek's Blog: [How to] Run PHPUnit tests using database 10x faster

Adam Culp: PHPUnit, Composer, PHPStorm, Oh my!


Community Events

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


conference community laravel opinion library example php7 version podcast api laravel5 unittest extension introduction voicesoftheelephpant release series framework language interview

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