Beispiel #1
0
 public function setUp()
 {
     if (empty($this->_backup)) {
         foreach (Connections::get() as $conn) {
             $this->_backup[$conn] = Connections::get($conn, array('config' => true));
         }
     }
     Connections::reset();
     Connections::add('mongo', array('type' => 'MongoDb', 'autoConnect' => false));
     Connections::add('couch', array('type' => 'http', 'adapter' => 'CouchDb'));
     MockDocumentPost::config(array('connection' => 'mongo'));
     MockDocumentMultipleKey::config(array('connection' => 'couch'));
 }
Beispiel #2
0
 public function setUp()
 {
     $connection = new MockDocumentSource();
     Connections::add('mockconn', array('object' => $connection));
     MockDocumentPost::config(array('meta' => array('connection' => 'mockconn')));
 }
 public function setUp()
 {
     MockDocumentPost::config(array('connection' => 'mongo'));
     MockDocumentPost::$connection = new MongoDb(array('autoConnect' => false));
     MockDocumentPost::$connection->connection = new MockMongoConnection();
 }