As new features come out for WordPress, they almost always suck. Here are some plugins that roll back new “features”.
Unfortunately, WP Disable Automatic Updates doesn’t seam to be working.
Behavior Driven Development in WordPress
Tired of some new feature in WordPress?
As new features come out for WordPress, they almost always suck. Here are some plugins that roll back new “features”.
Unfortunately, WP Disable Automatic Updates doesn’t seam to be working.
BDD is the best way to communicate business requirements from stakeholders to developers. General Chicken explains what BDD is from a business POV.
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.
I use an Ubuntu laptop with apache2. Your mileage will vary. When I develop a website, say site.com, I setup my laptop to redirect site.dev 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 Rackspace.com
On my machine, I setup two distinct WordPress installs, one at http://localhost and the other at http://wp.dev. One running version 4.9 and the other running version 3.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:
General Chicken publishes a plugin in the wordpress.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 wordpress.org repo:
Sometimes you want to do:
if($I->see('lorum ipsum')){/*do something*/}
But you can’t.
I created a template to mock a second function within a class that is being tested:
Stack Overflow: Mock method from the same class that tested method is using
acceptance tests
unit tests