API Move test theme setup to base class

I'd like to use this method in the CMS, so to save from copying it I've moved it into the base class.