github.com/goravel/framework@v1.13.9/database/gorm/mocks/Initialize.go (about) 1 // Code generated by mockery v2.14.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 config "github.com/goravel/framework/contracts/config" 9 10 gorm "github.com/goravel/framework/database/gorm" 11 12 mock "github.com/stretchr/testify/mock" 13 ) 14 15 // Initialize is an autogenerated mock type for the Initialize type 16 type Initialize struct { 17 mock.Mock 18 } 19 20 // InitializeGorm provides a mock function with given fields: _a0, connection 21 func (_m *Initialize) InitializeGorm(_a0 config.Config, connection string) *gorm.GormImpl { 22 ret := _m.Called(_a0, connection) 23 24 var r0 *gorm.GormImpl 25 if rf, ok := ret.Get(0).(func(config.Config, string) *gorm.GormImpl); ok { 26 r0 = rf(_a0, connection) 27 } else { 28 if ret.Get(0) != nil { 29 r0 = ret.Get(0).(*gorm.GormImpl) 30 } 31 } 32 33 return r0 34 } 35 36 // InitializeQuery provides a mock function with given fields: ctx, _a1, connection 37 func (_m *Initialize) InitializeQuery(ctx context.Context, _a1 config.Config, connection string) (*gorm.QueryImpl, error) { 38 ret := _m.Called(ctx, _a1, connection) 39 40 var r0 *gorm.QueryImpl 41 if rf, ok := ret.Get(0).(func(context.Context, config.Config, string) *gorm.QueryImpl); ok { 42 r0 = rf(ctx, _a1, connection) 43 } else { 44 if ret.Get(0) != nil { 45 r0 = ret.Get(0).(*gorm.QueryImpl) 46 } 47 } 48 49 var r1 error 50 if rf, ok := ret.Get(1).(func(context.Context, config.Config, string) error); ok { 51 r1 = rf(ctx, _a1, connection) 52 } else { 53 r1 = ret.Error(1) 54 } 55 56 return r0, r1 57 } 58 59 type mockConstructorTestingTNewInitialize interface { 60 mock.TestingT 61 Cleanup(func()) 62 } 63 64 // NewInitialize creates a new instance of Initialize. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 65 func NewInitialize(t mockConstructorTestingTNewInitialize) *Initialize { 66 mock := &Initialize{} 67 mock.Mock.Test(t) 68 69 t.Cleanup(func() { mock.AssertExpectations(t) }) 70 71 return mock 72 }