Goal: to add some PHPUnit tests to Safety Net to avoid accidental breaking changes. Related discussion in Slack
Done So Far
Basic composer.json with PHPUnit testing and pretty print
Testing folders and basic scaffolding files
Initial test of get_denylist_array(), which does not require a WP environment
To Do
We need to figure out the best way to simulate testing data for this. Given this plugin mostly operates on the DB, we may need to do this.
I've been looking to WooCommerce Bookings as an example, since it has a fair amount of testing built in. Bookings uses WP_Mock and also possibly a Docker setup to create a local testing environment, then remove it when testing is over.
PR in progress
Goal: to add some PHPUnit tests to Safety Net to avoid accidental breaking changes. Related discussion in Slack
Done So Far
composer.json
with PHPUnit testing and pretty printget_denylist_array()
, which does not require a WP environmentTo Do
We need to figure out the best way to simulate testing data for this. Given this plugin mostly operates on the DB, we may need to do this.
I've been looking to WooCommerce Bookings as an example, since it has a fair amount of testing built in. Bookings uses WP_Mock and also possibly a Docker setup to create a local testing environment, then remove it when testing is over.
Then, obviously, write some tests.