David Ogilo

menu search

I was approached by Purple to help them create a cutting edge website, which took a mobile first approach and showcases different elements of the company. The website was created using WordPress, which included a custom plugin with a OOP, TDD and CI approach. One of the main functionality was to create an API to post jobs onto the site via a third party system.

In this article I’ll show you how to create and run unit tests on your plugins using PHPUnit as the¬†framework. I’ll also be highlighting the importance of Test Driven Development.

WHY TDD?

There are some developers out there who are not fans of writing unit tests to test their code for bugs etc, but I’m not one of them. On the contrary I always write tests for my code. There are so many instances where these tests have picked up bugs. Not only that, writing tests has also made my code more efficient and in turn made me a better…

I recently created a simple program for the game “rock-paper-scissors”, which was for a job application. I decided to publish the code (including PHPUnit tests) on GitHub so if you want to extend or play around with it, please feel free to. The game has two modes – PVC (Player vs. Computer) and CVC (Computer vs. Computer). It can also store the instance and result of your game(s) incase you want to continue on a later date…

Old school browser detected!

Your browser is out of date, which means you can't use any of the site's required features. You can either upgrade your browser or switch to either Mozilla Firefox or Google Chrome