Warning: mysqli_real_connect(): Headers and client library minor version mismatch. Headers:50549 Library:100121 in /var/www/html/wordpress/wp-includes/wp-db.php on line 1531 February 17, 2015 - Taylor Lovett
I want my application to work on all the environments I claim to support but I have no way of easily testing updates in each environment.
Continuously push to your remote to force Travis CI to test changes in multiple environments.
Containerized unit testing with Dockunit.
Dockunit is a simple node command that lets you run your test framework of choice across a number of predefined containers. Each container can have it’s own test command and Docker image. It was born out of the need to ensure my PHP applications (WordPress specifically) were compatible with a spectrum of environments. Travis CI dropping support for PHP 5.2 was the final straw so I created this command for myself and decided to make it public.
Install/Usage Instructions for Dockunit
1. Ensure dependencies are met. See requirements on Github.
2. Install Dockunit
[code]npm install -g dockunit[/code]
3. Setup project(s) with predefined containers.
To do this create a file called Dockunit.json in the root of any project you want to run Dockunit on. Github contains specific guidelines for how to write Dockunit.json files. Here is an example file for testing a WordPress plugin in PHP 5.2 FPM in WordPress 4.1, PHP 5.5 FPM in WordPress 4.0, and PHP 5.5 for Apache in WordPress 3.9: