Added tests for ServiceManager, fixed bug with DI relating to Doctrine-type services and some test case tweaks.