github.com/goravel/framework@v1.13.9/contracts/log/mocks/Hook.go (about)

     1  // Code generated by mockery v2.33.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	log "github.com/goravel/framework/contracts/log"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // Hook is an autogenerated mock type for the Hook type
    11  type Hook struct {
    12  	mock.Mock
    13  }
    14  
    15  // Fire provides a mock function with given fields: _a0
    16  func (_m *Hook) Fire(_a0 log.Entry) error {
    17  	ret := _m.Called(_a0)
    18  
    19  	var r0 error
    20  	if rf, ok := ret.Get(0).(func(log.Entry) error); ok {
    21  		r0 = rf(_a0)
    22  	} else {
    23  		r0 = ret.Error(0)
    24  	}
    25  
    26  	return r0
    27  }
    28  
    29  // Levels provides a mock function with given fields:
    30  func (_m *Hook) Levels() []log.Level {
    31  	ret := _m.Called()
    32  
    33  	var r0 []log.Level
    34  	if rf, ok := ret.Get(0).(func() []log.Level); ok {
    35  		r0 = rf()
    36  	} else {
    37  		if ret.Get(0) != nil {
    38  			r0 = ret.Get(0).([]log.Level)
    39  		}
    40  	}
    41  
    42  	return r0
    43  }
    44  
    45  // NewHook creates a new instance of Hook. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    46  // The first argument is typically a *testing.T value.
    47  func NewHook(t interface {
    48  	mock.TestingT
    49  	Cleanup(func())
    50  }) *Hook {
    51  	mock := &Hook{}
    52  	mock.Mock.Test(t)
    53  
    54  	t.Cleanup(func() { mock.AssertExpectations(t) })
    55  
    56  	return mock
    57  }