function createMockConfirmationResult(operationType, isNewUser) {
  return {
    'confirm': function(code) {
      assertEquals('123456', code);
      app.getExternalAuth().setUser(
          {'phone': '+11234567890', 'displayName': 'John Smith'});
      return goog.Promise.resolve({
        'user': app.getExternalAuth().currentUser,
        'credential': null,
        'operationType': operationType,
        'additionalUserInfo':  {'providerId': 'phone', 'isNewUser': isNewUser}
      });
    }
  };
}
@param {string} operationType The operation type.
@param {boolean} isNewUser Whether the user is new.
@return {!firebase.auth.ConfirmationResult} The mock confirmation result
    object.