Pull out database selection logic into own function.
Make an attempt whilst checking requirements to make requisite directories writable.
Initial CivicrmTestBase class and basic installation tests.
civicrm_views test of Contacts listing with multiple relationships.
Tidy up CRM_Utils_System_Drupal8::formatResourceUrl().