Is the PHP framework CodeIgniter considered a good framework to work with in comparison to say Laravel or CakePHP?

Read John Dee's answer to Is the PHP framework CodeIgniter considered a good framework to work with in comparison to say Laravel or CakePHP? on Quora

Running Codeception tests on multiple WordPress environments

Using the –env flag in Codeception. Running tests against multiple versions of WordPress.

Suppose you want to run your test suite against multiple environments? Perhaps with different browsers or with different versions of WordPress or PHP? Codeception makes this easy with the –env flag.

This is a plugin I made that rolls back a new feature added to WordPress 4.9. I want to run an acceptance test against the latest version of WordPress, and also against a legacy version of WordPress.

Setup multiple environments

I use an Ubuntu laptop with apache2. Your mileage will vary. When I develop a website, say, I setup my laptop to redirect to a local directory on my laptop. There I keep a copy of the production site to work on.

Directions to setup multiple hosts from

On my machine, I setup two distinct WordPress installs, one at http://localhost and the other at One running version 4.9 and the other running version 3.9.

WordPress v 3.9.23
WordPress v 3.9.23

WordPress v 4.9
WordPress v 4.9

In this example, I’ll be running an acceptance test against both versions of WordPress. I’ll need to setup the YML file like this:

I use this command:
bin/codecept run acceptance -vvv --html --env remotehost --env localhost

bin/codecept is the executable [might be wpcept or codecept]
acceptance is the suite
remotehost and localhost are the envs
-vvv very very verbose [one dash]
–html report to html [two dashes]

Codeception runs:

Passing Tests!
Passing Tests!

WordPress Plugin: Change Admin Email

General Chicken publishes a plugin in the .org repo: Change Admin Email Setting Without Outbound Email

As of WordPress 4.9, the administrator cannot change the site admin email without outgoing email setup on the server, and recipient email credentials. This plugin restores the admin’s ability to change this setting without sending a confirmation email.

Plugin in the .org repo
Plugin on Github

Bonus BDD!
As a bonus, for developers I’m distributing some BDD Codeception tests with this plugin. The tests are designed to run via the WordPress module from Codeception. To run them, you’ll need composer, selenium, and chrome. To pull the framework, use the instructions here.

I use this as an example of running tests in multiple environments.

When building this, I used TDD / BDD by creating an acceptance test that worked on v3.9 so that I could run the same test against v4.9. This is overkill, but I wanted to show how to run tests against different environments.

Types of WordPress automated tests

state browser database SUT
WP Acceptance tests carries from test to test assumed headfull JS browser [ie. Selenium with Chrome] not reset after each test entire WP application executed with each browser call
Stateless acceptance tests tests run in isolation assumed headless JS browser [ie. PhantomJS] reset after each test entire WP application executed with each browser call
WP Unit tests tests run in isolation assume no browser or only cURL reset after each test WP application NOT executed
WP API tests tests run in isolation cURL only reset after each test WP application is executed

Live MasterMind BDD Group

Sign up to learn Behavior Driven Development in WordPress!

Hi! I’m John Dee. I’m the BDFL here at WordPress BDD. We have a MasterMind group to meet and do BDD in WP!

As a member of the MMG, you will have an opportunity to learn BDD in WordPress, and even get some free work done for your own projects. We take turns building classes and tests for each member of the MMG, so bring your development issues and we’ll solve them, the devops way!

We do a live screencast on Google Hangouts anytime I get 5 people who want to do TDD.


  • Setting up CodeCeption for WordPress in the cloud
  • acceptance testing in WordPress
  • unit testing in WordPress
  • Gherkin feature files

Contact John to sign up!

sms. (702)748-5491