GnomePHP and unittesting

Posted on 1st November 2011, 12:00 AM

After some thinking we figured we want to create our own unit testing software from scratch. Unit testing in GnomePHP is like using SimpleTest but GnomePHP does not include all those features ( even though we got a pretty huge spector of assert methods to test against values.

The ease of creating unit tests in GnomePHP is fantastic, i mean - i have never had so much fun creating unit tests. The unit tests is a part of the application itself - and thereby integrated nicely into the core of GnomePHP.

Unit testing in GnomePHP is all about writing one router rule ( to run it ) and then writing a test or just use the included unit tests that comes with GnomePHP. Ofcourse, there are not tests that tests your own models and controllers - but we have included tests for the application structure and ofcourse GnomePHP itself.

To test GnomePHP Framework you can just add this specific router rule:

*        /testgnome          \gnomephp\testsuite\TestGnome.index()

To test your application for missing files and directory structure add this rule:

*        /testapp          \gnomephp\testsuite\TestApplication.index()

Now just browse to http://example.com/testapp and http://example.com/testgnome for GnomePHP framework tests.

That's not all, you can see more at our wiki pages


Leave a reply

Please write the code you see on this image:

Human verification