Monthly Archives: November 2011

Zibbet nominated for best handmade market place – Vote now!

As you know, Zibbet is an online handmade artisan marketplace. Basically, you buy and sell handmade goods there. I’m responsible for a sizable chunk of the website and infrastructure it’s based on, so it’s quite important to me!
Continue reading

Tagged , ,

Testing using Mocks & Stubs with PHPUnit

Now that we’ve got PHPUnit setup, we need to start writing the unit tests.

My immediate needs are to Unit test two classes, the first being a basic structure with getters and setters with small calculations performed. The PHPUnit manual provides a great starting point for testing this class in chapters 4 and 6, so I wont cover those here.

The second class, however, maintains a list of objects of the first type as well as performing some calculations based on them. Since we’re doing unit tests and not integration tests, we need to make sure that the results of our second class are predictable which means decoupling it from the first class. This obviously presents a problem whereby it would no longer function without the first class. This is where Mocks and Stubs come in.
Continue reading

Tagged , , ,

Installing PHPUnit on Ubuntu Linux

To install PHPUnit, there are two direct dependencies which first need to be installed;

  • PEAR
  • Xdebug

As Xdebug also depends on PEAR, we’ll make sure that’s installed first.
Continue reading

Tagged , , , ,

Come one, come all!

Welcome to the new site of Jess Telford!

This will be the space for all the rants and ravings I can come up with whilst romping through the vast and wild interwebs.

For now, why not catch up with me at some other places around the internet;
Continue reading

Tagged ,