github.com/goravel/framework@v1.13.9/contracts/console/mocks/Context.go (about) 1 // Code generated by mockery v2.14.0. DO NOT EDIT. 2 3 package mocks 4 5 import mock "github.com/stretchr/testify/mock" 6 7 // Context is an autogenerated mock type for the Context type 8 type Context struct { 9 mock.Mock 10 } 11 12 // Argument provides a mock function with given fields: index 13 func (_m *Context) Argument(index int) string { 14 ret := _m.Called(index) 15 16 var r0 string 17 if rf, ok := ret.Get(0).(func(int) string); ok { 18 r0 = rf(index) 19 } else { 20 r0 = ret.Get(0).(string) 21 } 22 23 return r0 24 } 25 26 // Arguments provides a mock function with given fields: 27 func (_m *Context) Arguments() []string { 28 ret := _m.Called() 29 30 var r0 []string 31 if rf, ok := ret.Get(0).(func() []string); ok { 32 r0 = rf() 33 } else { 34 if ret.Get(0) != nil { 35 r0 = ret.Get(0).([]string) 36 } 37 } 38 39 return r0 40 } 41 42 // Option provides a mock function with given fields: key 43 func (_m *Context) Option(key string) string { 44 ret := _m.Called(key) 45 46 var r0 string 47 if rf, ok := ret.Get(0).(func(string) string); ok { 48 r0 = rf(key) 49 } else { 50 r0 = ret.Get(0).(string) 51 } 52 53 return r0 54 } 55 56 // OptionBool provides a mock function with given fields: key 57 func (_m *Context) OptionBool(key string) bool { 58 ret := _m.Called(key) 59 60 var r0 bool 61 if rf, ok := ret.Get(0).(func(string) bool); ok { 62 r0 = rf(key) 63 } else { 64 r0 = ret.Get(0).(bool) 65 } 66 67 return r0 68 } 69 70 // OptionFloat64 provides a mock function with given fields: key 71 func (_m *Context) OptionFloat64(key string) float64 { 72 ret := _m.Called(key) 73 74 var r0 float64 75 if rf, ok := ret.Get(0).(func(string) float64); ok { 76 r0 = rf(key) 77 } else { 78 r0 = ret.Get(0).(float64) 79 } 80 81 return r0 82 } 83 84 // OptionFloat64Slice provides a mock function with given fields: key 85 func (_m *Context) OptionFloat64Slice(key string) []float64 { 86 ret := _m.Called(key) 87 88 var r0 []float64 89 if rf, ok := ret.Get(0).(func(string) []float64); ok { 90 r0 = rf(key) 91 } else { 92 if ret.Get(0) != nil { 93 r0 = ret.Get(0).([]float64) 94 } 95 } 96 97 return r0 98 } 99 100 // OptionInt provides a mock function with given fields: key 101 func (_m *Context) OptionInt(key string) int { 102 ret := _m.Called(key) 103 104 var r0 int 105 if rf, ok := ret.Get(0).(func(string) int); ok { 106 r0 = rf(key) 107 } else { 108 r0 = ret.Get(0).(int) 109 } 110 111 return r0 112 } 113 114 // OptionInt64 provides a mock function with given fields: key 115 func (_m *Context) OptionInt64(key string) int64 { 116 ret := _m.Called(key) 117 118 var r0 int64 119 if rf, ok := ret.Get(0).(func(string) int64); ok { 120 r0 = rf(key) 121 } else { 122 r0 = ret.Get(0).(int64) 123 } 124 125 return r0 126 } 127 128 // OptionInt64Slice provides a mock function with given fields: key 129 func (_m *Context) OptionInt64Slice(key string) []int64 { 130 ret := _m.Called(key) 131 132 var r0 []int64 133 if rf, ok := ret.Get(0).(func(string) []int64); ok { 134 r0 = rf(key) 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).([]int64) 138 } 139 } 140 141 return r0 142 } 143 144 // OptionIntSlice provides a mock function with given fields: key 145 func (_m *Context) OptionIntSlice(key string) []int { 146 ret := _m.Called(key) 147 148 var r0 []int 149 if rf, ok := ret.Get(0).(func(string) []int); ok { 150 r0 = rf(key) 151 } else { 152 if ret.Get(0) != nil { 153 r0 = ret.Get(0).([]int) 154 } 155 } 156 157 return r0 158 } 159 160 // OptionSlice provides a mock function with given fields: key 161 func (_m *Context) OptionSlice(key string) []string { 162 ret := _m.Called(key) 163 164 var r0 []string 165 if rf, ok := ret.Get(0).(func(string) []string); ok { 166 r0 = rf(key) 167 } else { 168 if ret.Get(0) != nil { 169 r0 = ret.Get(0).([]string) 170 } 171 } 172 173 return r0 174 } 175 176 type mockConstructorTestingTNewContext interface { 177 mock.TestingT 178 Cleanup(func()) 179 } 180 181 // NewContext creates a new instance of Context. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 182 func NewContext(t mockConstructorTestingTNewContext) *Context { 183 mock := &Context{} 184 mock.Mock.Test(t) 185 186 t.Cleanup(func() { mock.AssertExpectations(t) }) 187 188 return mock 189 }