예제 #1
0
 public function testDeleteReturnsFalseWhenMongoIdMissing()
 {
     // the return value from the find
     $collectionName = 'users';
     $userData = $this->getUserData();
     unset($userData['_id']);
     // remove _id
     $query = array('name' => 'Hans');
     $options = array('multi' => false);
     $this->connectionMock->expects($this->never())->method('delete');
     $user = new UserUnit($userData);
     $result = $user->delete();
     $this->assertFalse($result);
 }