Overview for testing

PHP (7.2), Xdebug and Docker (Compose)

For our project at work, we needed to set up Xdebug in Docker. Not only this, but we had different developers using different machines and operating systems, the IP of the host would need to be flexible for it to work for us all. Here's how we did it.

Contract Testing

Getting things set up and rolling at my new job, the test setup and how to do some things was something I was especially interested in. Due to past experience with testing, I was asked to put thoughts, ideas and techniques together to help us kick things off 'right'. I brought up the subject of contract testing and figured I'd write up my thoughts and notes on it.

Using SQLite with Kahlan in PHP

I've been using Kahlan for testing a bit recently, I really like the describe-it style. I had a project where I needed to write an SQLite implementation of a repository and I wanted to use Kahlan to test the implementation, here's how I did it.

Cigar: Smoke testing in PHP

Inspired by something I saw a friend write in Go, I've written a small smoke testing tool in PHP.

Transformers in Behat

Transformers can provide a lot of helpful utility in Behat, reducing the work required to get what you need within your step definitions.

Page objects in Behat

When working with web pages in behat, you can use something such as Mink directly to drive the browser and navigate around the site. But with page objects, you can make things a little more re-usable, here's how.