News Feed

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

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 Continuous Integration (with Jenkins), Part 1

DevShed: Am Introduction to PHP Security

Zend: Extension Writing Tutorials - Resources (Part 3)

Kenny Katzgrau's Blog: Enable Site-Wide Profiling With CodeIgniter Using Callback Functions in PHP

Community Events

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

yii2 opinion list framework part2 introduction interview application php7 example laravel series api programming language community project composer podcast symfony

All content copyright, 2015 :: - Powered by the Solar PHP Framework