2023-04-10 14:20:57 +05:30
// Code generated by mockery v2.23.2. DO NOT EDIT.
2017-10-25 11:33:19 -05:00
2018-05-15 13:33:47 -07:00
// Regenerate this file using `make plugin-mocks`.
2017-08-28 11:27:18 -05:00
2018-05-15 13:33:47 -07:00
package plugintest
2017-08-16 17:23:38 -05:00
2019-09-03 18:41:52 -04:00
import (
io "io"
http "net/http"
mock "github.com/stretchr/testify/mock"
2023-06-11 10:54:35 +05:30
model "github.com/mattermost/mattermost/server/public/model"
2019-09-03 18:41:52 -04:00
2023-06-11 10:54:35 +05:30
plugin "github.com/mattermost/mattermost/server/public/plugin"
2019-09-03 18:41:52 -04:00
)
2017-08-16 17:23:38 -05:00
2018-05-15 13:33:47 -07:00
// Hooks is an autogenerated mock type for the Hooks type
2017-08-16 17:23:38 -05:00
type Hooks struct {
mock . Mock
}
2018-07-07 00:32:55 +02:00
// ChannelHasBeenCreated provides a mock function with given fields: c, channel
func ( _m * Hooks ) ChannelHasBeenCreated ( c * plugin . Context , channel * model . Channel ) {
_m . Called ( c , channel )
}
2023-06-12 18:23:02 -06:00
// ConfigurationWillBeSaved provides a mock function with given fields: newCfg
func ( _m * Hooks ) ConfigurationWillBeSaved ( newCfg * model . Config ) ( * model . Config , error ) {
ret := _m . Called ( newCfg )
var r0 * model . Config
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( * model . Config ) ( * model . Config , error ) ) ; ok {
return rf ( newCfg )
}
if rf , ok := ret . Get ( 0 ) . ( func ( * model . Config ) * model . Config ) ; ok {
r0 = rf ( newCfg )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Config )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( * model . Config ) error ) ; ok {
r1 = rf ( newCfg )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2018-07-06 06:07:09 -07:00
// ExecuteCommand provides a mock function with given fields: c, args
func ( _m * Hooks ) ExecuteCommand ( c * plugin . Context , args * model . CommandArgs ) ( * model . CommandResponse , * model . AppError ) {
ret := _m . Called ( c , args )
2018-05-15 13:33:47 -07:00
var r0 * model . CommandResponse
2023-04-10 14:20:57 +05:30
var r1 * model . AppError
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . CommandArgs ) ( * model . CommandResponse , * model . AppError ) ) ; ok {
return rf ( c , args )
}
2018-07-06 06:07:09 -07:00
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . CommandArgs ) * model . CommandResponse ) ; ok {
r0 = rf ( c , args )
2018-05-15 13:33:47 -07:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . CommandResponse )
}
}
2018-07-06 06:07:09 -07:00
if rf , ok := ret . Get ( 1 ) . ( func ( * plugin . Context , * model . CommandArgs ) * model . AppError ) ; ok {
r1 = rf ( c , args )
2018-05-15 13:33:47 -07:00
} else {
if ret . Get ( 1 ) != nil {
r1 = ret . Get ( 1 ) . ( * model . AppError )
}
}
return r0 , r1
}
2018-07-30 20:55:38 +02:00
// FileWillBeUploaded provides a mock function with given fields: c, info, file, output
func ( _m * Hooks ) FileWillBeUploaded ( c * plugin . Context , info * model . FileInfo , file io . Reader , output io . Writer ) ( * model . FileInfo , string ) {
ret := _m . Called ( c , info , file , output )
var r0 * model . FileInfo
2023-04-10 14:20:57 +05:30
var r1 string
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . FileInfo , io . Reader , io . Writer ) ( * model . FileInfo , string ) ) ; ok {
return rf ( c , info , file , output )
}
2018-07-30 20:55:38 +02:00
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . FileInfo , io . Reader , io . Writer ) * model . FileInfo ) ; ok {
r0 = rf ( c , info , file , output )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . FileInfo )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( * plugin . Context , * model . FileInfo , io . Reader , io . Writer ) string ) ; ok {
r1 = rf ( c , info , file , output )
} else {
r1 = ret . Get ( 1 ) . ( string )
}
return r0 , r1
}
2018-06-25 12:33:13 -07:00
// Implemented provides a mock function with given fields:
func ( _m * Hooks ) Implemented ( ) ( [ ] string , error ) {
ret := _m . Called ( )
var r0 [ ] string
2023-04-10 14:20:57 +05:30
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) ( [ ] string , error ) ) ; ok {
return rf ( )
}
2018-06-25 12:33:13 -07:00
if rf , ok := ret . Get ( 0 ) . ( func ( ) [ ] string ) ; ok {
r0 = rf ( )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] string )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( ) error ) ; ok {
r1 = rf ( )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-09-14 18:33:22 +02:00
// MessageHasBeenDeleted provides a mock function with given fields: c, post
func ( _m * Hooks ) MessageHasBeenDeleted ( c * plugin . Context , post * model . Post ) {
_m . Called ( c , post )
}
2018-07-06 06:07:09 -07:00
// MessageHasBeenPosted provides a mock function with given fields: c, post
func ( _m * Hooks ) MessageHasBeenPosted ( c * plugin . Context , post * model . Post ) {
_m . Called ( c , post )
2018-05-15 13:33:47 -07:00
}
2018-07-06 06:07:09 -07:00
// MessageHasBeenUpdated provides a mock function with given fields: c, newPost, oldPost
func ( _m * Hooks ) MessageHasBeenUpdated ( c * plugin . Context , newPost * model . Post , oldPost * model . Post ) {
_m . Called ( c , newPost , oldPost )
2018-05-15 13:33:47 -07:00
}
2018-07-06 06:07:09 -07:00
// MessageWillBePosted provides a mock function with given fields: c, post
func ( _m * Hooks ) MessageWillBePosted ( c * plugin . Context , post * model . Post ) ( * model . Post , string ) {
ret := _m . Called ( c , post )
2018-05-15 13:33:47 -07:00
var r0 * model . Post
2023-04-10 14:20:57 +05:30
var r1 string
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . Post ) ( * model . Post , string ) ) ; ok {
return rf ( c , post )
}
2018-07-06 06:07:09 -07:00
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . Post ) * model . Post ) ; ok {
r0 = rf ( c , post )
2018-05-15 13:33:47 -07:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Post )
}
}
2017-08-16 17:23:38 -05:00
2018-07-06 06:07:09 -07:00
if rf , ok := ret . Get ( 1 ) . ( func ( * plugin . Context , * model . Post ) string ) ; ok {
r1 = rf ( c , post )
2018-05-15 13:33:47 -07:00
} else {
r1 = ret . Get ( 1 ) . ( string )
2017-12-08 13:55:41 -06:00
}
2018-05-15 13:33:47 -07:00
return r0 , r1
2017-08-16 17:23:38 -05:00
}
2018-07-06 06:07:09 -07:00
// MessageWillBeUpdated provides a mock function with given fields: c, newPost, oldPost
func ( _m * Hooks ) MessageWillBeUpdated ( c * plugin . Context , newPost * model . Post , oldPost * model . Post ) ( * model . Post , string ) {
ret := _m . Called ( c , newPost , oldPost )
2018-05-15 13:33:47 -07:00
var r0 * model . Post
2023-04-10 14:20:57 +05:30
var r1 string
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . Post , * model . Post ) ( * model . Post , string ) ) ; ok {
return rf ( c , newPost , oldPost )
}
2018-07-06 06:07:09 -07:00
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . Post , * model . Post ) * model . Post ) ; ok {
r0 = rf ( c , newPost , oldPost )
2018-05-15 13:33:47 -07:00
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . Post )
}
}
2018-07-06 06:07:09 -07:00
if rf , ok := ret . Get ( 1 ) . ( func ( * plugin . Context , * model . Post , * model . Post ) string ) ; ok {
r1 = rf ( c , newPost , oldPost )
2018-05-15 13:33:47 -07:00
} else {
r1 = ret . Get ( 1 ) . ( string )
}
return r0 , r1
2017-08-16 17:23:38 -05:00
}
2017-08-28 11:27:18 -05:00
2023-10-23 10:12:46 -04:00
// MessagesWillBeConsumed provides a mock function with given fields: posts
func ( _m * Hooks ) MessagesWillBeConsumed ( posts [ ] * model . Post ) [ ] * model . Post {
ret := _m . Called ( posts )
var r0 [ ] * model . Post
if rf , ok := ret . Get ( 0 ) . ( func ( [ ] * model . Post ) [ ] * model . Post ) ; ok {
r0 = rf ( posts )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] * model . Post )
}
}
return r0
}
2023-08-24 12:33:53 -04:00
// NotificationWillBePushed provides a mock function with given fields: pushNotification, userID
func ( _m * Hooks ) NotificationWillBePushed ( pushNotification * model . PushNotification , userID string ) ( * model . PushNotification , string ) {
ret := _m . Called ( pushNotification , userID )
2023-08-18 12:01:50 -04:00
2023-08-24 12:33:53 -04:00
var r0 * model . PushNotification
var r1 string
if rf , ok := ret . Get ( 0 ) . ( func ( * model . PushNotification , string ) ( * model . PushNotification , string ) ) ; ok {
return rf ( pushNotification , userID )
}
if rf , ok := ret . Get ( 0 ) . ( func ( * model . PushNotification , string ) * model . PushNotification ) ; ok {
r0 = rf ( pushNotification , userID )
2023-08-18 12:01:50 -04:00
} else {
2023-08-24 12:33:53 -04:00
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * model . PushNotification )
}
2023-08-18 12:01:50 -04:00
}
2023-08-24 12:33:53 -04:00
if rf , ok := ret . Get ( 1 ) . ( func ( * model . PushNotification , string ) string ) ; ok {
r1 = rf ( pushNotification , userID )
} else {
r1 = ret . Get ( 1 ) . ( string )
}
return r0 , r1
2023-08-18 12:01:50 -04:00
}
2018-06-25 12:33:13 -07:00
// OnActivate provides a mock function with given fields:
func ( _m * Hooks ) OnActivate ( ) error {
ret := _m . Called ( )
2018-05-15 13:33:47 -07:00
var r0 error
2018-06-25 12:33:13 -07:00
if rf , ok := ret . Get ( 0 ) . ( func ( ) error ) ; ok {
r0 = rf ( )
2018-05-15 13:33:47 -07:00
} else {
r0 = ret . Error ( 0 )
}
return r0
2017-09-11 10:02:02 -05:00
}
2022-05-09 08:05:50 -05:00
// OnCloudLimitsUpdated provides a mock function with given fields: limits
func ( _m * Hooks ) OnCloudLimitsUpdated ( limits * model . ProductLimits ) {
_m . Called ( limits )
}
2018-05-15 13:33:47 -07:00
// OnConfigurationChange provides a mock function with given fields:
func ( _m * Hooks ) OnConfigurationChange ( ) error {
ret := _m . Called ( )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) error ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Error ( 0 )
}
return r0
2017-08-28 11:27:18 -05:00
}
2017-12-08 13:55:41 -06:00
2018-05-15 13:33:47 -07:00
// OnDeactivate provides a mock function with given fields:
func ( _m * Hooks ) OnDeactivate ( ) error {
ret := _m . Called ( )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) error ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Error ( 0 )
2017-12-08 13:55:41 -06:00
}
2018-05-15 13:33:47 -07:00
return r0
}
2022-02-09 20:29:00 +01:00
// OnInstall provides a mock function with given fields: c, event
func ( _m * Hooks ) OnInstall ( c * plugin . Context , event model . OnInstallEvent ) error {
ret := _m . Called ( c , event )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , model . OnInstallEvent ) error ) ; ok {
r0 = rf ( c , event )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2021-04-28 19:59:32 +02:00
// OnPluginClusterEvent provides a mock function with given fields: c, ev
func ( _m * Hooks ) OnPluginClusterEvent ( c * plugin . Context , ev model . PluginClusterEvent ) {
_m . Called ( c , ev )
}
2022-02-10 06:20:00 +01:00
// OnSendDailyTelemetry provides a mock function with given fields:
func ( _m * Hooks ) OnSendDailyTelemetry ( ) {
_m . Called ( )
}
2024-01-16 09:48:51 -05:00
// OnSharedChannelsAttachmentSyncMsg provides a mock function with given fields: fi, post, rc
func ( _m * Hooks ) OnSharedChannelsAttachmentSyncMsg ( fi * model . FileInfo , post * model . Post , rc * model . RemoteCluster ) error {
ret := _m . Called ( fi , post , rc )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( * model . FileInfo , * model . Post , * model . RemoteCluster ) error ) ; ok {
r0 = rf ( fi , post , rc )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
// OnSharedChannelsPing provides a mock function with given fields: rc
func ( _m * Hooks ) OnSharedChannelsPing ( rc * model . RemoteCluster ) bool {
ret := _m . Called ( rc )
var r0 bool
if rf , ok := ret . Get ( 0 ) . ( func ( * model . RemoteCluster ) bool ) ; ok {
r0 = rf ( rc )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
return r0
}
2024-01-16 09:48:51 -05:00
// OnSharedChannelsProfileImageSyncMsg provides a mock function with given fields: user, rc
func ( _m * Hooks ) OnSharedChannelsProfileImageSyncMsg ( user * model . User , rc * model . RemoteCluster ) error {
ret := _m . Called ( user , rc )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( * model . User , * model . RemoteCluster ) error ) ; ok {
r0 = rf ( user , rc )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
Shared channels plugin APIs for MS Teams plugin (#25805)
New plugin APIs and hooks for accessing Shared Channels service via plugin.
- RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (remoteID string, err error)
- UnregisterPluginForSharedChannels(pluginID string) error
- ShareChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UpdateSharedChannel(sc *model.SharedChannel) (*model.SharedChannel, error)
- UnshareChannel(channelID string) (unshared bool, err error)
- UpdateSharedChannelCursor(channelID, remoteID string, cusror model.GetPostsSinceForSyncCursor) error
- SyncSharedChannel(channelID string) error
- InviteRemoteToChannel(channelID string, remoteID string, userID string) error
- UninviteRemoteFromChannel(channelID string, remoteID string) error
Hooks
- OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
- OnSharedChannelsPing(rc *model.RemoteCluster) bool
2023-12-22 17:00:27 -05:00
// OnSharedChannelsSyncMsg provides a mock function with given fields: msg, rc
func ( _m * Hooks ) OnSharedChannelsSyncMsg ( msg * model . SyncMsg , rc * model . RemoteCluster ) ( model . SyncResponse , error ) {
ret := _m . Called ( msg , rc )
var r0 model . SyncResponse
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( * model . SyncMsg , * model . RemoteCluster ) ( model . SyncResponse , error ) ) ; ok {
return rf ( msg , rc )
}
if rf , ok := ret . Get ( 0 ) . ( func ( * model . SyncMsg , * model . RemoteCluster ) model . SyncResponse ) ; ok {
r0 = rf ( msg , rc )
} else {
r0 = ret . Get ( 0 ) . ( model . SyncResponse )
}
if rf , ok := ret . Get ( 1 ) . ( func ( * model . SyncMsg , * model . RemoteCluster ) error ) ; ok {
r1 = rf ( msg , rc )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2021-09-23 14:43:09 +02:00
// OnWebSocketConnect provides a mock function with given fields: webConnID, userID
func ( _m * Hooks ) OnWebSocketConnect ( webConnID string , userID string ) {
_m . Called ( webConnID , userID )
}
// OnWebSocketDisconnect provides a mock function with given fields: webConnID, userID
func ( _m * Hooks ) OnWebSocketDisconnect ( webConnID string , userID string ) {
_m . Called ( webConnID , userID )
}
2024-01-03 12:25:53 -05:00
// PreferencesHaveChanged provides a mock function with given fields: c, preferences
func ( _m * Hooks ) PreferencesHaveChanged ( c * plugin . Context , preferences [ ] model . Preference ) {
_m . Called ( c , preferences )
}
2020-10-31 02:06:43 -04:00
// ReactionHasBeenAdded provides a mock function with given fields: c, reaction
func ( _m * Hooks ) ReactionHasBeenAdded ( c * plugin . Context , reaction * model . Reaction ) {
_m . Called ( c , reaction )
}
// ReactionHasBeenRemoved provides a mock function with given fields: c, reaction
func ( _m * Hooks ) ReactionHasBeenRemoved ( c * plugin . Context , reaction * model . Reaction ) {
_m . Called ( c , reaction )
}
2022-01-20 17:46:03 -07:00
// RunDataRetention provides a mock function with given fields: nowTime, batchSize
func ( _m * Hooks ) RunDataRetention ( nowTime int64 , batchSize int64 ) ( int64 , error ) {
ret := _m . Called ( nowTime , batchSize )
var r0 int64
2023-04-10 14:20:57 +05:30
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( int64 , int64 ) ( int64 , error ) ) ; ok {
return rf ( nowTime , batchSize )
}
2022-01-20 17:46:03 -07:00
if rf , ok := ret . Get ( 0 ) . ( func ( int64 , int64 ) int64 ) ; ok {
r0 = rf ( nowTime , batchSize )
} else {
r0 = ret . Get ( 0 ) . ( int64 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( int64 , int64 ) error ) ; ok {
r1 = rf ( nowTime , batchSize )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2018-07-06 06:07:09 -07:00
// ServeHTTP provides a mock function with given fields: c, w, r
func ( _m * Hooks ) ServeHTTP ( c * plugin . Context , w http . ResponseWriter , r * http . Request ) {
_m . Called ( c , w , r )
2017-12-08 13:55:41 -06:00
}
2018-07-07 00:32:55 +02:00
2023-11-17 14:39:06 -06:00
// ServeMetrics provides a mock function with given fields: c, w, r
func ( _m * Hooks ) ServeMetrics ( c * plugin . Context , w http . ResponseWriter , r * http . Request ) {
_m . Called ( c , w , r )
}
2019-01-29 18:40:48 +01:00
// UserHasBeenCreated provides a mock function with given fields: c, user
func ( _m * Hooks ) UserHasBeenCreated ( c * plugin . Context , user * model . User ) {
_m . Called ( c , user )
}
2023-08-30 01:55:20 -05:00
// UserHasBeenDeactivated provides a mock function with given fields: c, user
func ( _m * Hooks ) UserHasBeenDeactivated ( c * plugin . Context , user * model . User ) {
_m . Called ( c , user )
}
2018-07-07 00:32:55 +02:00
// UserHasJoinedChannel provides a mock function with given fields: c, channelMember, actor
func ( _m * Hooks ) UserHasJoinedChannel ( c * plugin . Context , channelMember * model . ChannelMember , actor * model . User ) {
_m . Called ( c , channelMember , actor )
}
// UserHasJoinedTeam provides a mock function with given fields: c, teamMember, actor
func ( _m * Hooks ) UserHasJoinedTeam ( c * plugin . Context , teamMember * model . TeamMember , actor * model . User ) {
_m . Called ( c , teamMember , actor )
}
// UserHasLeftChannel provides a mock function with given fields: c, channelMember, actor
func ( _m * Hooks ) UserHasLeftChannel ( c * plugin . Context , channelMember * model . ChannelMember , actor * model . User ) {
_m . Called ( c , channelMember , actor )
}
// UserHasLeftTeam provides a mock function with given fields: c, teamMember, actor
func ( _m * Hooks ) UserHasLeftTeam ( c * plugin . Context , teamMember * model . TeamMember , actor * model . User ) {
_m . Called ( c , teamMember , actor )
}
2018-07-30 20:55:38 +02:00
// UserHasLoggedIn provides a mock function with given fields: c, user
func ( _m * Hooks ) UserHasLoggedIn ( c * plugin . Context , user * model . User ) {
_m . Called ( c , user )
}
// UserWillLogIn provides a mock function with given fields: c, user
func ( _m * Hooks ) UserWillLogIn ( c * plugin . Context , user * model . User ) string {
ret := _m . Called ( c , user )
var r0 string
if rf , ok := ret . Get ( 0 ) . ( func ( * plugin . Context , * model . User ) string ) ; ok {
r0 = rf ( c , user )
} else {
r0 = ret . Get ( 0 ) . ( string )
}
return r0
}
2021-09-23 14:43:09 +02:00
// WebSocketMessageHasBeenPosted provides a mock function with given fields: webConnID, userID, req
func ( _m * Hooks ) WebSocketMessageHasBeenPosted ( webConnID string , userID string , req * model . WebSocketRequest ) {
_m . Called ( webConnID , userID , req )
}
2023-04-10 14:20:57 +05:30
type mockConstructorTestingTNewHooks interface {
mock . TestingT
Cleanup ( func ( ) )
}
// NewHooks creates a new instance of Hooks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewHooks ( t mockConstructorTestingTNewHooks ) * Hooks {
mock := & Hooks { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}