News Feed
Jobs Feed
Sections




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

PHPit.net:
An introduction to Test Driven Development with PHP
June 10, 2006 @ 15:37:36

PHPit.net has posted yet another PHP-related tutorial, this time with a focus on test driven development.

There are several different ways of developing something. Most of us tend to simply start with a script, and gradually move along. Perhaps we've even laid out our script before hand, but we tend to stay at the developing phase, and don't really start testing when it's necessary. Basically, we develop first, and test later.

But this might not be the best way, and might lead to problems later. That's why some developers advocate a different way of developing called Test Driven Development (TDD), where by you test first, and develop later.

He uses the SimpleTest frameork to illustrate his points. He starts off with a simple example - settin g up the framework and creating a class to test a class, Biter. The testing class first just looks to see if the Biter class exists, failing before they create the class file it's looking for. With the help of a bit more code and a few more test examples, you get a good jumping off point for creating your own tests to evaluate your code.

0 comments voice your opinion now!
test drive development simpletest tutorial test drive development simpletest tutorial


blog comments powered by Disqus

Similar Posts

Jim Plush\'s Blog: My-Bic Ajax Framework Video Tutorials Online

Brandon Savage's Blog: Peer Review: Testable Code And Architecture

MaltBlue.com: Zend Form Mastery with Zend_Config - Part 3, Standard Form & Element Options

IBM developerWorks: Understanding the Zend Framework, Part 2 (MVC & a Database)

NetTuts.com: Letís TDD a Simple App in PHP


Community Events











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


hack application unittest framework database language release install component facebook introduction opinion package hhvm symfony2 composer podcast series security performance

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