Make all tests extend a new base class

Activity version of owncloud/core#12297