Writing a “Hello World” Test with QBElggTestsForPHPUnit

Posted by on Dec 16, 2011

Hello World

 

Writing a test with QBElggTestsForPHPUnit is not much different that writing a standard test with PHPUnit. In future posts we will see how to tweak things a little (like adding custom fixtures) but right now I’m just going to show you how to write a very simple tests: the HelloWorldTest . The purpose of this test is two-folded:

Read More

Installing QBElggTestsForPHPUnit

Posted by on Nov 25, 2011

In a previous post we introduced QBElggTestsForPHPUnit, an extension of PHPUnit used to test elgg-related functionality (note: PHPUnit is not bundled with this plugin. We assume that PHPUnit is already installed on your machine and the include paths are properly configured). In this post I will show you how to install this plugin and check that everything is running properly.

Read More

Torwards a safe unit test suite in elgg

Posted by on Nov 10, 2011

Safety Matters
“To test or not to test” is a question that, by this time, should have been completely deprecated of a programer’s mind. Yes, I know, we all have programmed good pieces of software when the whole unit test concept wasn’t mainstream, but if you ever took the time to write a couple of good tests you know that they are a really good weapon against unexpected bugs.

Read More