protected function _before() { if (!extension_loaded('MongoDB')) { $this->markTestSkipped("MongoDB extension not loaded, test skipped"); return; } Di::reset(); $di = new DI(); $di->set('mongo', function () { $mongo = new MongoClient('mongodb://' . TEST_MONGODB_HOST . ':' . TEST_MONGODB_PORT); return $mongo->selectDatabase('phalcon_test'); }); $di->set('collectionManager', function () { return new Manager(); }); }