News Feed
Jobs Feed
Sections




News Archive
SitePoint PHP Blog:
pTest PHP Unit Tester in 9 Lines Of Code
August 13, 2007 @ 12:05:00

On the SitePoint PHP blog, there's a new post from Paul Annesley about his latest creation - a nine line unit tester for PHP, pTest.

I was recently working on a command line PHP tool, and didn't have easy access to our normal PHP unit testing framework built around SimpleTest. [...] I didn't need support for mock objects or complicated assertions - just a bare basic assertTrue() would do the trick.

He includes the code (of course) and an example of it in action, three tests with their assertions. It's a simple little tool made of a simple purpose, a starting place for developers just learning unit testing to learn from.

0 comments voice your opinion now!
ptest unittest small tutorial simpletest assertion ptest unittest small tutorial simpletest assertion


blog comments powered by Disqus

Similar Posts

IBM developerWorks: Devise Web 2.0 applications with PHP and DHTML (Part 1)

PHPFreaks.com: Sessions and cookies: Adding state to a stateless protocol

Lorna Mitchell's Blog: Getting Dates from Week Numbers in PHP

DevShed: Handling Static Data with PHP 5

NetBeans Blog: Code coverage for PHP - why not?


Community Events











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


zendframework2 unittest usergroup podcast interview symfony2 introduction rest framework series community database release opinion development functional testing conference language phpunit

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