github.com/goravel/framework@v1.13.9/contracts/http/mocks/ContextResponse.go (about) 1 // Code generated by mockery v2.33.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 http "github.com/goravel/framework/contracts/http" 7 mock "github.com/stretchr/testify/mock" 8 9 nethttp "net/http" 10 ) 11 12 // ContextResponse is an autogenerated mock type for the ContextResponse type 13 type ContextResponse struct { 14 mock.Mock 15 } 16 17 // Data provides a mock function with given fields: code, contentType, data 18 func (_m *ContextResponse) Data(code int, contentType string, data []byte) http.Response { 19 ret := _m.Called(code, contentType, data) 20 21 var r0 http.Response 22 if rf, ok := ret.Get(0).(func(int, string, []byte) http.Response); ok { 23 r0 = rf(code, contentType, data) 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(http.Response) 27 } 28 } 29 30 return r0 31 } 32 33 // Download provides a mock function with given fields: filepath, filename 34 func (_m *ContextResponse) Download(filepath string, filename string) http.Response { 35 ret := _m.Called(filepath, filename) 36 37 var r0 http.Response 38 if rf, ok := ret.Get(0).(func(string, string) http.Response); ok { 39 r0 = rf(filepath, filename) 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(http.Response) 43 } 44 } 45 46 return r0 47 } 48 49 // File provides a mock function with given fields: filepath 50 func (_m *ContextResponse) File(filepath string) http.Response { 51 ret := _m.Called(filepath) 52 53 var r0 http.Response 54 if rf, ok := ret.Get(0).(func(string) http.Response); ok { 55 r0 = rf(filepath) 56 } else { 57 if ret.Get(0) != nil { 58 r0 = ret.Get(0).(http.Response) 59 } 60 } 61 62 return r0 63 } 64 65 // Flush provides a mock function with given fields: 66 func (_m *ContextResponse) Flush() { 67 _m.Called() 68 } 69 70 // Header provides a mock function with given fields: key, value 71 func (_m *ContextResponse) Header(key string, value string) http.ContextResponse { 72 ret := _m.Called(key, value) 73 74 var r0 http.ContextResponse 75 if rf, ok := ret.Get(0).(func(string, string) http.ContextResponse); ok { 76 r0 = rf(key, value) 77 } else { 78 if ret.Get(0) != nil { 79 r0 = ret.Get(0).(http.ContextResponse) 80 } 81 } 82 83 return r0 84 } 85 86 // Json provides a mock function with given fields: code, obj 87 func (_m *ContextResponse) Json(code int, obj interface{}) http.Response { 88 ret := _m.Called(code, obj) 89 90 var r0 http.Response 91 if rf, ok := ret.Get(0).(func(int, interface{}) http.Response); ok { 92 r0 = rf(code, obj) 93 } else { 94 if ret.Get(0) != nil { 95 r0 = ret.Get(0).(http.Response) 96 } 97 } 98 99 return r0 100 } 101 102 // Origin provides a mock function with given fields: 103 func (_m *ContextResponse) Origin() http.ResponseOrigin { 104 ret := _m.Called() 105 106 var r0 http.ResponseOrigin 107 if rf, ok := ret.Get(0).(func() http.ResponseOrigin); ok { 108 r0 = rf() 109 } else { 110 if ret.Get(0) != nil { 111 r0 = ret.Get(0).(http.ResponseOrigin) 112 } 113 } 114 115 return r0 116 } 117 118 // Redirect provides a mock function with given fields: code, location 119 func (_m *ContextResponse) Redirect(code int, location string) http.Response { 120 ret := _m.Called(code, location) 121 122 var r0 http.Response 123 if rf, ok := ret.Get(0).(func(int, string) http.Response); ok { 124 r0 = rf(code, location) 125 } else { 126 if ret.Get(0) != nil { 127 r0 = ret.Get(0).(http.Response) 128 } 129 } 130 131 return r0 132 } 133 134 // Status provides a mock function with given fields: code 135 func (_m *ContextResponse) Status(code int) http.ResponseStatus { 136 ret := _m.Called(code) 137 138 var r0 http.ResponseStatus 139 if rf, ok := ret.Get(0).(func(int) http.ResponseStatus); ok { 140 r0 = rf(code) 141 } else { 142 if ret.Get(0) != nil { 143 r0 = ret.Get(0).(http.ResponseStatus) 144 } 145 } 146 147 return r0 148 } 149 150 // String provides a mock function with given fields: code, format, values 151 func (_m *ContextResponse) String(code int, format string, values ...interface{}) http.Response { 152 var _ca []interface{} 153 _ca = append(_ca, code, format) 154 _ca = append(_ca, values...) 155 ret := _m.Called(_ca...) 156 157 var r0 http.Response 158 if rf, ok := ret.Get(0).(func(int, string, ...interface{}) http.Response); ok { 159 r0 = rf(code, format, values...) 160 } else { 161 if ret.Get(0) != nil { 162 r0 = ret.Get(0).(http.Response) 163 } 164 } 165 166 return r0 167 } 168 169 // Success provides a mock function with given fields: 170 func (_m *ContextResponse) Success() http.ResponseSuccess { 171 ret := _m.Called() 172 173 var r0 http.ResponseSuccess 174 if rf, ok := ret.Get(0).(func() http.ResponseSuccess); ok { 175 r0 = rf() 176 } else { 177 if ret.Get(0) != nil { 178 r0 = ret.Get(0).(http.ResponseSuccess) 179 } 180 } 181 182 return r0 183 } 184 185 // View provides a mock function with given fields: 186 func (_m *ContextResponse) View() http.ResponseView { 187 ret := _m.Called() 188 189 var r0 http.ResponseView 190 if rf, ok := ret.Get(0).(func() http.ResponseView); ok { 191 r0 = rf() 192 } else { 193 if ret.Get(0) != nil { 194 r0 = ret.Get(0).(http.ResponseView) 195 } 196 } 197 198 return r0 199 } 200 201 // Writer provides a mock function with given fields: 202 func (_m *ContextResponse) Writer() nethttp.ResponseWriter { 203 ret := _m.Called() 204 205 var r0 nethttp.ResponseWriter 206 if rf, ok := ret.Get(0).(func() nethttp.ResponseWriter); ok { 207 r0 = rf() 208 } else { 209 if ret.Get(0) != nil { 210 r0 = ret.Get(0).(nethttp.ResponseWriter) 211 } 212 } 213 214 return r0 215 } 216 217 // NewContextResponse creates a new instance of ContextResponse. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 218 // The first argument is typically a *testing.T value. 219 func NewContextResponse(t interface { 220 mock.TestingT 221 Cleanup(func()) 222 }) *ContextResponse { 223 mock := &ContextResponse{} 224 mock.Mock.Test(t) 225 226 t.Cleanup(func() { mock.AssertExpectations(t) }) 227 228 return mock 229 }