예제 #1
0
 protected function setUp()
 {
     $this->db = Mongo_Database::instance('mongotest', array('database' => 'mongotest'));
     $this->db->createCollection('mongotest');
     $this->db->mongotest->remove(array());
 }
예제 #2
0
 /**
  * Get the Mongo_Database instance used for this collection
  *
  * @return  Mongo_Database
  */
 public function db()
 {
     return Mongo_Database::instance($this->db);
 }
예제 #3
0
 public function setup()
 {
     $this->db = Mongo_Database::instance('mongotest', array('database' => 'mongotest', 'profiling' => TRUE));
     $this->db->createCollection('mongotest');
     $this->db->mongotest->remove(array());
 }