News Feed
Sections




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

Nola's Blog:
Test Freak!
January 26, 2006 @ 06:37:20

In her latest post, Nola shares a testing class that she has created based on the Test::Simple method.

I'm writing a PHP class for a user, and then think.. oh gee, how do I know if this works?? oh I'll write a Test::Simple for PHP. Yes, I know there exists one already that uses the power of Perl to test PHP files, but I didn't have time to figure out how to set that up and probably won't be able to use perl anyways on the production system. I can't stand to have global variables, so I made a class. Uber simple. There's probably better ways to do it (I can imagine something much more elegant in PHP 5). But, what do you expect on a whim and 40 minutes...

her code runs a simple check to see if the end of the line being checked (passed in). It's a pretty basic testing framework, but has potential if it was made to accept "test plugins". Of course, there's other options out there too when it comes to testing in PHP...

0 comments voice your opinion now!
testing Test::Simple check newline EOL testing Test::Simple check newline EOL


blog comments powered by Disqus

Similar Posts

Chris Shiflett\'s Blog: JApacheCon (Power PHP Testing talk)

Giorgio Sironi's Blog: Practical Testing in PHP (Series)

Padraic Brady's Blog: Ruby Testing Tools Missing From PHP

Shashikant Jagtap: Behat2.4 : Painless installation with Composer

PHPClasses.org: PHP 5.4 Features: Shall you Upgrade to the newer PHP Version?


Community Events





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


configure introduction experience laravel testing threedevsandamaybe series code opinion symfony2 release unittest interview install community list framework developer podcast language

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