Fix tests to use doctrine