protected function setUp() { $app = new Console(); $di = new \Pimple(); // insert test service we want to ensure is set $dep_service = Phake::mock('Skip\\Tests\\Dummy\\TestModel'); $di['test'] = $dep_service; $this->dep_service = $dep_service; // insert di to be used instead of console creating its own $app->setApp($di); // configure console as normal with a json config (take a look at if this test needs chaning!) $app->configure('./tests/config/console.json'); $app->setAutoExit(false); $this->tester = new ApplicationTester($app); }