Basically, we configure each site with information about how to access its code, database and files and perform provisioning (each of those four things are represented by PHP classes). Then we can ask the app to backup the site, restore from backups, pull it down to our staging server, or push our changes out to the production site. ... It designed to work with whatever crazy hosting our customers are using, which is why we have the swappable PHP classes to represent the site's components. It's currently about ~7500 lines of PHP code, including tests.
... This is a very new app, currently only ~1500 lines of PHP code, including tests.
The Behat tests we need help with are simple acceptance tests for our customers' Drupal sites that we run to make sure our changes to their sites don't break anything.