Adapts test helper to changes in core, fixes remaining bugs and renames database aliases