예제 #1
0
 public function testSaveInserts()
 {
     // the return value from the find
     $collectionName = 'users';
     $userData = array('name' => 'Martyn', 'created_at' => new \MongoDate(time()));
     $this->connectionMock->expects($this->once())->method('insert')->with($collectionName, $userData);
     $user = new UserValidator($userData);
     $user->save();
 }