This is something I put together for the engineering team at Howsy. Hopefully it will be of some assistance for others. The examples are in PHP but can be abstracted to any OOP language.

What is Unit Testing?

It’s simply a test that runs against an individual ‘unit’ or component of software. We are testing the smallest possible implementation of a class/method. A unit test does not rely on any dependencies (other classes/libraries or even the database)

Read more about unit testing here.

Why is it important?

I mean we could just stick with integration tests right? They are easy to write, however …

The goal of any…

I found myself today having to build a tiny e-commerce site. When I say tiny, I mean *literally* tiny. The site itself is more of a proof of concept rather than the finished version. As I was building away I figured, despite being small, it should still have minimal sorting and filtering features for ease of use (and besides if it works I’m going to have to build the whole thing out anyway)

The easiest way (I decided) was to use data-attributes to assign product information to each product container. This will make it super easy to sort the products…

Daniel Benzie

I’m just a human who builds software. Lead Software Engineer @HowsyApp. Founder @alertr

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store