sharedFixture['em'])) { $this->_em = $this->sharedFixture['em']; } else { $config = new Doctrine_Configuration(); $eventManager = new Doctrine_EventManager(); $connectionOptions = array( 'driverClass' => 'Doctrine_DriverMock', 'wrapperClass' => 'Doctrine_ConnectionMock', 'user' => 'john', 'password' => 'wayne' ); $em = Doctrine_ORM_EntityManager::create($connectionOptions, 'mockEM', $config, $eventManager); $this->_em = $em; } $this->_em->activate(); } }