Rather than mocking all parts of the Craft service locator, I opted for a more integration focused approach. In the current test suite the Craft::$app object is set up as normal (thanks to the Yii2 module) and there are many tests where we don't mock results of calls to the Craft::...