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