Exemplo n.º 1
0
 /**
  * Make sure the data is actually stored in the databse
  */
 public function testCreateBucketDataStored()
 {
     $bucket_data = array('_id' => 'test-bucket', 'description' => 'Test Bucket');
     $collection = $this->mongo->selectCollection(Bucket::$collection);
     $this->assertEquals(0, $collection->count());
     $bucket = new Bucket($bucket_data);
     $bucket->save();
     $this->assertEquals(1, $collection->count());
     $this->assertEquals(array('description' => 'Test Bucket'), $collection->findOne(array(), array('_id' => 0, 'description' => 1)));
 }