Post By Email update: tests and multiple WP versions
First off: After I mentioned last week that I needed a POP mail account to test with, several folks with their own mail servers offered their help. I’m set up with something now. Thanks to all who reached out!
The past week has been all about testing, with the goal of getting good unit and/or integration tests written for the Post By Email plugin before I start adding features to it. This is entirely new territory for me, though I’ve done some TDD in Ruby in the past. So far, I’ve learned how the tests work on Core, and gotten a whole mess of things installed and running (wp-cli, Pear, PHPUnit, etc.). I followed this guide to set up the basic test structure for the plugin. I was hoping to have some actual tests done for this week’s update, but it took a bit longer than expected to get the framework set up, so I don’t have anything ready for primetime yet.
So, this week’s question: What are some plugins that have really good tests? I’m seeking examples of what to do (or not to do!). I’m especially curious to see tests of Settings API stuff and install/activation functions.
Side note: I really need to clean up my development setup for testing against multiple WordPress versions. I have several versions installed already, but they’re pretty haphazard (with different databases, inconsistent directory names, etc.). I found this very good post about a development setup with multiple WP versions. For those of you who support plugins or themes on multiple versions — any tips? Is your setup similar to that post?