Photo by Testalize on Unsplash

An integration test is one that is written to cover multiple modules working as a group. For the most part this would mean testing that our code works as expected when making real queries to a database (e.g not mocking database connections and function calls — in the case of unit tests).

The problem

The usual approach I have taken in the past for integration testing is to create a test database that I migrate and seed during the lifecycle of each running test. …

As a software developer who enjoys the occasional battle royale game I have come to notice a few similarities between an optimal gaming experience and successful agile software development process. The majority of which is focused around teamwork, communication and discipline.

If you don’t know anything about battle royale or Warzone, this probably isn’t the article for you (it may be fun though to see me have a complete ‘nerd-gazm’) - as I am going to deep dive into specifics right away. …

The distance on a plane

Given the X and Y position on a flat plane we can calculate the distance between two points using the Pythagorean theorem.

Here’s what you can expect from this article: I will be discussing some of the key aspects of company values from an employee’s perspective and how we learned to use them to our advantage at Nona. All this in relation to the game, Hacky Sack.

The rules of the game

What’s the first and most important rule of hacky sack? Keep the beanbag up.

What’s the second rule of hacky sack? Don’t injure yourself.

The soft, roughly stitched bean bag flies through the air of the company parking lot. The bag makes its way down, far outside of the outer perimeter of the hacky sack…

A practical guide to mocking in PHPUnit

First, what is a mock?

A mock is a piece of dummy code that helps your tests run in a way that isolates specific functionality.

e.g. we can mock out a function to return values in a way that makes a related piece of functionality either pass or fail a test.

An example of a mocked function would be a mimicked response from a database call with dummy data that matches what we would expect the database call returned data to look like.

This is useful in unit testing as we don’t actually want to call a database, but rather test a specific piece of…

This article serves as the first of a series on unit testing in PHPUnit aimed at providing a fundamental understanding of unit tests at a basic level. To do this I’ll be going through an example with PHPUnit. First I’ll be showing you how to setup PHPUnit and introducing assertions (a core part of tests). Then I’ll dive in to how and why we write unit tests.

A brief setup of PHPUnit

  1. First install PHPUnit (I will assume you have php ~7 installed on your system)

2. Next, verify that it has been installed: run the following in your terminal.

phpunit --v

3. Create a…

In this article I will be looking at if and when the AWS Parameter Store should be used to replace environment variables within the AWS infrastructure. I will not be looking at what each of these are or how to set them up in any in-depth way but rather a comparison between the two.

A case for environment variables

Easy to setup

It is pretty simple to get setup with environment variables. Node, for example, has a dotenv module that can be installed via npm with a single command:

npm install dotenv

We need to make sure that dotenv has an entry point somewhere in…

Richard Miles

Full-stack Developer

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