github.com/goravel/framework@v1.13.9/contracts/auth/access/mocks/Gate.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  	access "github.com/goravel/framework/contracts/auth/access"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  )
    12  
    13  // Gate is an autogenerated mock type for the Gate type
    14  type Gate struct {
    15  	mock.Mock
    16  }
    17  
    18  // After provides a mock function with given fields: callback
    19  func (_m *Gate) After(callback func(context.Context, string, map[string]interface{}, access.Response) access.Response) {
    20  	_m.Called(callback)
    21  }
    22  
    23  // Allows provides a mock function with given fields: ability, arguments
    24  func (_m *Gate) Allows(ability string, arguments map[string]interface{}) bool {
    25  	ret := _m.Called(ability, arguments)
    26  
    27  	var r0 bool
    28  	if rf, ok := ret.Get(0).(func(string, map[string]interface{}) bool); ok {
    29  		r0 = rf(ability, arguments)
    30  	} else {
    31  		r0 = ret.Get(0).(bool)
    32  	}
    33  
    34  	return r0
    35  }
    36  
    37  // Any provides a mock function with given fields: abilities, arguments
    38  func (_m *Gate) Any(abilities []string, arguments map[string]interface{}) bool {
    39  	ret := _m.Called(abilities, arguments)
    40  
    41  	var r0 bool
    42  	if rf, ok := ret.Get(0).(func([]string, map[string]interface{}) bool); ok {
    43  		r0 = rf(abilities, arguments)
    44  	} else {
    45  		r0 = ret.Get(0).(bool)
    46  	}
    47  
    48  	return r0
    49  }
    50  
    51  // Before provides a mock function with given fields: callback
    52  func (_m *Gate) Before(callback func(context.Context, string, map[string]interface{}) access.Response) {
    53  	_m.Called(callback)
    54  }
    55  
    56  // Define provides a mock function with given fields: ability, callback
    57  func (_m *Gate) Define(ability string, callback func(context.Context, map[string]interface{}) access.Response) {
    58  	_m.Called(ability, callback)
    59  }
    60  
    61  // Denies provides a mock function with given fields: ability, arguments
    62  func (_m *Gate) Denies(ability string, arguments map[string]interface{}) bool {
    63  	ret := _m.Called(ability, arguments)
    64  
    65  	var r0 bool
    66  	if rf, ok := ret.Get(0).(func(string, map[string]interface{}) bool); ok {
    67  		r0 = rf(ability, arguments)
    68  	} else {
    69  		r0 = ret.Get(0).(bool)
    70  	}
    71  
    72  	return r0
    73  }
    74  
    75  // Inspect provides a mock function with given fields: ability, arguments
    76  func (_m *Gate) Inspect(ability string, arguments map[string]interface{}) access.Response {
    77  	ret := _m.Called(ability, arguments)
    78  
    79  	var r0 access.Response
    80  	if rf, ok := ret.Get(0).(func(string, map[string]interface{}) access.Response); ok {
    81  		r0 = rf(ability, arguments)
    82  	} else {
    83  		if ret.Get(0) != nil {
    84  			r0 = ret.Get(0).(access.Response)
    85  		}
    86  	}
    87  
    88  	return r0
    89  }
    90  
    91  // None provides a mock function with given fields: abilities, arguments
    92  func (_m *Gate) None(abilities []string, arguments map[string]interface{}) bool {
    93  	ret := _m.Called(abilities, arguments)
    94  
    95  	var r0 bool
    96  	if rf, ok := ret.Get(0).(func([]string, map[string]interface{}) bool); ok {
    97  		r0 = rf(abilities, arguments)
    98  	} else {
    99  		r0 = ret.Get(0).(bool)
   100  	}
   101  
   102  	return r0
   103  }
   104  
   105  // WithContext provides a mock function with given fields: ctx
   106  func (_m *Gate) WithContext(ctx context.Context) access.Gate {
   107  	ret := _m.Called(ctx)
   108  
   109  	var r0 access.Gate
   110  	if rf, ok := ret.Get(0).(func(context.Context) access.Gate); ok {
   111  		r0 = rf(ctx)
   112  	} else {
   113  		if ret.Get(0) != nil {
   114  			r0 = ret.Get(0).(access.Gate)
   115  		}
   116  	}
   117  
   118  	return r0
   119  }
   120  
   121  type mockConstructorTestingTNewGate interface {
   122  	mock.TestingT
   123  	Cleanup(func())
   124  }
   125  
   126  // NewGate creates a new instance of Gate. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   127  func NewGate(t mockConstructorTestingTNewGate) *Gate {
   128  	mock := &Gate{}
   129  	mock.Mock.Test(t)
   130  
   131  	t.Cleanup(func() { mock.AssertExpectations(t) })
   132  
   133  	return mock
   134  }