WIP fixes for testing

TODO:
* Research upstream, are we the only ones running phpunit?  Or missing a bootstrap level?

Change-Id: I04157cdaf382d8cced89dc097d9903674e8470df
Merge "WIP fixes for testing"