github.com/goravel/framework@v1.13.9/contracts/foundation/mocks/Application.go (about)

     1  // Code generated by mockery v2.14.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	auth "github.com/goravel/framework/contracts/auth"
     7  	access "github.com/goravel/framework/contracts/auth/access"
     8  
     9  	cache "github.com/goravel/framework/contracts/cache"
    10  
    11  	config "github.com/goravel/framework/contracts/config"
    12  
    13  	console "github.com/goravel/framework/contracts/console"
    14  
    15  	crypt "github.com/goravel/framework/contracts/crypt"
    16  
    17  	event "github.com/goravel/framework/contracts/event"
    18  
    19  	filesystem "github.com/goravel/framework/contracts/filesystem"
    20  
    21  	foundation "github.com/goravel/framework/contracts/foundation"
    22  
    23  	grpc "github.com/goravel/framework/contracts/grpc"
    24  
    25  	hash "github.com/goravel/framework/contracts/hash"
    26  
    27  	http "github.com/goravel/framework/contracts/http"
    28  
    29  	log "github.com/goravel/framework/contracts/log"
    30  
    31  	mail "github.com/goravel/framework/contracts/mail"
    32  
    33  	mock "github.com/stretchr/testify/mock"
    34  
    35  	orm "github.com/goravel/framework/contracts/database/orm"
    36  
    37  	queue "github.com/goravel/framework/contracts/queue"
    38  
    39  	route "github.com/goravel/framework/contracts/route"
    40  
    41  	schedule "github.com/goravel/framework/contracts/schedule"
    42  
    43  	seeder "github.com/goravel/framework/contracts/database/seeder"
    44  
    45  	testing "github.com/goravel/framework/contracts/testing"
    46  
    47  	validation "github.com/goravel/framework/contracts/validation"
    48  )
    49  
    50  // Application is an autogenerated mock type for the Application type
    51  type Application struct {
    52  	mock.Mock
    53  }
    54  
    55  // BasePath provides a mock function with given fields: path
    56  func (_m *Application) BasePath(path string) string {
    57  	ret := _m.Called(path)
    58  
    59  	var r0 string
    60  	if rf, ok := ret.Get(0).(func(string) string); ok {
    61  		r0 = rf(path)
    62  	} else {
    63  		r0 = ret.Get(0).(string)
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // Bind provides a mock function with given fields: key, callback
    70  func (_m *Application) Bind(key interface{}, callback func(foundation.Application) (interface{}, error)) {
    71  	_m.Called(key, callback)
    72  }
    73  
    74  // BindWith provides a mock function with given fields: key, callback
    75  func (_m *Application) BindWith(key interface{}, callback func(foundation.Application, map[string]interface{}) (interface{}, error)) {
    76  	_m.Called(key, callback)
    77  }
    78  
    79  // Boot provides a mock function with given fields:
    80  func (_m *Application) Boot() {
    81  	_m.Called()
    82  }
    83  
    84  // Commands provides a mock function with given fields: _a0
    85  func (_m *Application) Commands(_a0 []console.Command) {
    86  	_m.Called(_a0)
    87  }
    88  
    89  // ConfigPath provides a mock function with given fields: path
    90  func (_m *Application) ConfigPath(path string) string {
    91  	ret := _m.Called(path)
    92  
    93  	var r0 string
    94  	if rf, ok := ret.Get(0).(func(string) string); ok {
    95  		r0 = rf(path)
    96  	} else {
    97  		r0 = ret.Get(0).(string)
    98  	}
    99  
   100  	return r0
   101  }
   102  
   103  // DatabasePath provides a mock function with given fields: path
   104  func (_m *Application) DatabasePath(path string) string {
   105  	ret := _m.Called(path)
   106  
   107  	var r0 string
   108  	if rf, ok := ret.Get(0).(func(string) string); ok {
   109  		r0 = rf(path)
   110  	} else {
   111  		r0 = ret.Get(0).(string)
   112  	}
   113  
   114  	return r0
   115  }
   116  
   117  // Instance provides a mock function with given fields: key, instance
   118  func (_m *Application) Instance(key interface{}, instance interface{}) {
   119  	_m.Called(key, instance)
   120  }
   121  
   122  // Make provides a mock function with given fields: key
   123  func (_m *Application) Make(key interface{}) (interface{}, error) {
   124  	ret := _m.Called(key)
   125  
   126  	var r0 interface{}
   127  	if rf, ok := ret.Get(0).(func(interface{}) interface{}); ok {
   128  		r0 = rf(key)
   129  	} else {
   130  		if ret.Get(0) != nil {
   131  			r0 = ret.Get(0).(interface{})
   132  		}
   133  	}
   134  
   135  	var r1 error
   136  	if rf, ok := ret.Get(1).(func(interface{}) error); ok {
   137  		r1 = rf(key)
   138  	} else {
   139  		r1 = ret.Error(1)
   140  	}
   141  
   142  	return r0, r1
   143  }
   144  
   145  // MakeArtisan provides a mock function with given fields:
   146  func (_m *Application) MakeArtisan() console.Artisan {
   147  	ret := _m.Called()
   148  
   149  	var r0 console.Artisan
   150  	if rf, ok := ret.Get(0).(func() console.Artisan); ok {
   151  		r0 = rf()
   152  	} else {
   153  		if ret.Get(0) != nil {
   154  			r0 = ret.Get(0).(console.Artisan)
   155  		}
   156  	}
   157  
   158  	return r0
   159  }
   160  
   161  // MakeAuth provides a mock function with given fields:
   162  func (_m *Application) MakeAuth() auth.Auth {
   163  	ret := _m.Called()
   164  
   165  	var r0 auth.Auth
   166  	if rf, ok := ret.Get(0).(func() auth.Auth); ok {
   167  		r0 = rf()
   168  	} else {
   169  		if ret.Get(0) != nil {
   170  			r0 = ret.Get(0).(auth.Auth)
   171  		}
   172  	}
   173  
   174  	return r0
   175  }
   176  
   177  // MakeCache provides a mock function with given fields:
   178  func (_m *Application) MakeCache() cache.Cache {
   179  	ret := _m.Called()
   180  
   181  	var r0 cache.Cache
   182  	if rf, ok := ret.Get(0).(func() cache.Cache); ok {
   183  		r0 = rf()
   184  	} else {
   185  		if ret.Get(0) != nil {
   186  			r0 = ret.Get(0).(cache.Cache)
   187  		}
   188  	}
   189  
   190  	return r0
   191  }
   192  
   193  // MakeConfig provides a mock function with given fields:
   194  func (_m *Application) MakeConfig() config.Config {
   195  	ret := _m.Called()
   196  
   197  	var r0 config.Config
   198  	if rf, ok := ret.Get(0).(func() config.Config); ok {
   199  		r0 = rf()
   200  	} else {
   201  		if ret.Get(0) != nil {
   202  			r0 = ret.Get(0).(config.Config)
   203  		}
   204  	}
   205  
   206  	return r0
   207  }
   208  
   209  // MakeCrypt provides a mock function with given fields:
   210  func (_m *Application) MakeCrypt() crypt.Crypt {
   211  	ret := _m.Called()
   212  
   213  	var r0 crypt.Crypt
   214  	if rf, ok := ret.Get(0).(func() crypt.Crypt); ok {
   215  		r0 = rf()
   216  	} else {
   217  		if ret.Get(0) != nil {
   218  			r0 = ret.Get(0).(crypt.Crypt)
   219  		}
   220  	}
   221  
   222  	return r0
   223  }
   224  
   225  // MakeEvent provides a mock function with given fields:
   226  func (_m *Application) MakeEvent() event.Instance {
   227  	ret := _m.Called()
   228  
   229  	var r0 event.Instance
   230  	if rf, ok := ret.Get(0).(func() event.Instance); ok {
   231  		r0 = rf()
   232  	} else {
   233  		if ret.Get(0) != nil {
   234  			r0 = ret.Get(0).(event.Instance)
   235  		}
   236  	}
   237  
   238  	return r0
   239  }
   240  
   241  // MakeGate provides a mock function with given fields:
   242  func (_m *Application) MakeGate() access.Gate {
   243  	ret := _m.Called()
   244  
   245  	var r0 access.Gate
   246  	if rf, ok := ret.Get(0).(func() access.Gate); ok {
   247  		r0 = rf()
   248  	} else {
   249  		if ret.Get(0) != nil {
   250  			r0 = ret.Get(0).(access.Gate)
   251  		}
   252  	}
   253  
   254  	return r0
   255  }
   256  
   257  // MakeGrpc provides a mock function with given fields:
   258  func (_m *Application) MakeGrpc() grpc.Grpc {
   259  	ret := _m.Called()
   260  
   261  	var r0 grpc.Grpc
   262  	if rf, ok := ret.Get(0).(func() grpc.Grpc); ok {
   263  		r0 = rf()
   264  	} else {
   265  		if ret.Get(0) != nil {
   266  			r0 = ret.Get(0).(grpc.Grpc)
   267  		}
   268  	}
   269  
   270  	return r0
   271  }
   272  
   273  // MakeHash provides a mock function with given fields:
   274  func (_m *Application) MakeHash() hash.Hash {
   275  	ret := _m.Called()
   276  
   277  	var r0 hash.Hash
   278  	if rf, ok := ret.Get(0).(func() hash.Hash); ok {
   279  		r0 = rf()
   280  	} else {
   281  		if ret.Get(0) != nil {
   282  			r0 = ret.Get(0).(hash.Hash)
   283  		}
   284  	}
   285  
   286  	return r0
   287  }
   288  
   289  // MakeLog provides a mock function with given fields:
   290  func (_m *Application) MakeLog() log.Log {
   291  	ret := _m.Called()
   292  
   293  	var r0 log.Log
   294  	if rf, ok := ret.Get(0).(func() log.Log); ok {
   295  		r0 = rf()
   296  	} else {
   297  		if ret.Get(0) != nil {
   298  			r0 = ret.Get(0).(log.Log)
   299  		}
   300  	}
   301  
   302  	return r0
   303  }
   304  
   305  // MakeMail provides a mock function with given fields:
   306  func (_m *Application) MakeMail() mail.Mail {
   307  	ret := _m.Called()
   308  
   309  	var r0 mail.Mail
   310  	if rf, ok := ret.Get(0).(func() mail.Mail); ok {
   311  		r0 = rf()
   312  	} else {
   313  		if ret.Get(0) != nil {
   314  			r0 = ret.Get(0).(mail.Mail)
   315  		}
   316  	}
   317  
   318  	return r0
   319  }
   320  
   321  // MakeOrm provides a mock function with given fields:
   322  func (_m *Application) MakeOrm() orm.Orm {
   323  	ret := _m.Called()
   324  
   325  	var r0 orm.Orm
   326  	if rf, ok := ret.Get(0).(func() orm.Orm); ok {
   327  		r0 = rf()
   328  	} else {
   329  		if ret.Get(0) != nil {
   330  			r0 = ret.Get(0).(orm.Orm)
   331  		}
   332  	}
   333  
   334  	return r0
   335  }
   336  
   337  // MakeQueue provides a mock function with given fields:
   338  func (_m *Application) MakeQueue() queue.Queue {
   339  	ret := _m.Called()
   340  
   341  	var r0 queue.Queue
   342  	if rf, ok := ret.Get(0).(func() queue.Queue); ok {
   343  		r0 = rf()
   344  	} else {
   345  		if ret.Get(0) != nil {
   346  			r0 = ret.Get(0).(queue.Queue)
   347  		}
   348  	}
   349  
   350  	return r0
   351  }
   352  
   353  // MakeRateLimiter provides a mock function with given fields:
   354  func (_m *Application) MakeRateLimiter() http.RateLimiter {
   355  	ret := _m.Called()
   356  
   357  	var r0 http.RateLimiter
   358  	if rf, ok := ret.Get(0).(func() http.RateLimiter); ok {
   359  		r0 = rf()
   360  	} else {
   361  		if ret.Get(0) != nil {
   362  			r0 = ret.Get(0).(http.RateLimiter)
   363  		}
   364  	}
   365  
   366  	return r0
   367  }
   368  
   369  // MakeRoute provides a mock function with given fields:
   370  func (_m *Application) MakeRoute() route.Route {
   371  	ret := _m.Called()
   372  
   373  	var r0 route.Route
   374  	if rf, ok := ret.Get(0).(func() route.Route); ok {
   375  		r0 = rf()
   376  	} else {
   377  		if ret.Get(0) != nil {
   378  			r0 = ret.Get(0).(route.Route)
   379  		}
   380  	}
   381  
   382  	return r0
   383  }
   384  
   385  // MakeSchedule provides a mock function with given fields:
   386  func (_m *Application) MakeSchedule() schedule.Schedule {
   387  	ret := _m.Called()
   388  
   389  	var r0 schedule.Schedule
   390  	if rf, ok := ret.Get(0).(func() schedule.Schedule); ok {
   391  		r0 = rf()
   392  	} else {
   393  		if ret.Get(0) != nil {
   394  			r0 = ret.Get(0).(schedule.Schedule)
   395  		}
   396  	}
   397  
   398  	return r0
   399  }
   400  
   401  // MakeSeeder provides a mock function with given fields:
   402  func (_m *Application) MakeSeeder() seeder.Facade {
   403  	ret := _m.Called()
   404  
   405  	var r0 seeder.Facade
   406  	if rf, ok := ret.Get(0).(func() seeder.Facade); ok {
   407  		r0 = rf()
   408  	} else {
   409  		if ret.Get(0) != nil {
   410  			r0 = ret.Get(0).(seeder.Facade)
   411  		}
   412  	}
   413  
   414  	return r0
   415  }
   416  
   417  // MakeStorage provides a mock function with given fields:
   418  func (_m *Application) MakeStorage() filesystem.Storage {
   419  	ret := _m.Called()
   420  
   421  	var r0 filesystem.Storage
   422  	if rf, ok := ret.Get(0).(func() filesystem.Storage); ok {
   423  		r0 = rf()
   424  	} else {
   425  		if ret.Get(0) != nil {
   426  			r0 = ret.Get(0).(filesystem.Storage)
   427  		}
   428  	}
   429  
   430  	return r0
   431  }
   432  
   433  // MakeTesting provides a mock function with given fields:
   434  func (_m *Application) MakeTesting() testing.Testing {
   435  	ret := _m.Called()
   436  
   437  	var r0 testing.Testing
   438  	if rf, ok := ret.Get(0).(func() testing.Testing); ok {
   439  		r0 = rf()
   440  	} else {
   441  		if ret.Get(0) != nil {
   442  			r0 = ret.Get(0).(testing.Testing)
   443  		}
   444  	}
   445  
   446  	return r0
   447  }
   448  
   449  // MakeValidation provides a mock function with given fields:
   450  func (_m *Application) MakeValidation() validation.Validation {
   451  	ret := _m.Called()
   452  
   453  	var r0 validation.Validation
   454  	if rf, ok := ret.Get(0).(func() validation.Validation); ok {
   455  		r0 = rf()
   456  	} else {
   457  		if ret.Get(0) != nil {
   458  			r0 = ret.Get(0).(validation.Validation)
   459  		}
   460  	}
   461  
   462  	return r0
   463  }
   464  
   465  // MakeView provides a mock function with given fields:
   466  func (_m *Application) MakeView() http.View {
   467  	ret := _m.Called()
   468  
   469  	var r0 http.View
   470  	if rf, ok := ret.Get(0).(func() http.View); ok {
   471  		r0 = rf()
   472  	} else {
   473  		if ret.Get(0) != nil {
   474  			r0 = ret.Get(0).(http.View)
   475  		}
   476  	}
   477  
   478  	return r0
   479  }
   480  
   481  // MakeWith provides a mock function with given fields: key, parameters
   482  func (_m *Application) MakeWith(key interface{}, parameters map[string]interface{}) (interface{}, error) {
   483  	ret := _m.Called(key, parameters)
   484  
   485  	var r0 interface{}
   486  	if rf, ok := ret.Get(0).(func(interface{}, map[string]interface{}) interface{}); ok {
   487  		r0 = rf(key, parameters)
   488  	} else {
   489  		if ret.Get(0) != nil {
   490  			r0 = ret.Get(0).(interface{})
   491  		}
   492  	}
   493  
   494  	var r1 error
   495  	if rf, ok := ret.Get(1).(func(interface{}, map[string]interface{}) error); ok {
   496  		r1 = rf(key, parameters)
   497  	} else {
   498  		r1 = ret.Error(1)
   499  	}
   500  
   501  	return r0, r1
   502  }
   503  
   504  // Path provides a mock function with given fields: path
   505  func (_m *Application) Path(path string) string {
   506  	ret := _m.Called(path)
   507  
   508  	var r0 string
   509  	if rf, ok := ret.Get(0).(func(string) string); ok {
   510  		r0 = rf(path)
   511  	} else {
   512  		r0 = ret.Get(0).(string)
   513  	}
   514  
   515  	return r0
   516  }
   517  
   518  // PublicPath provides a mock function with given fields: path
   519  func (_m *Application) PublicPath(path string) string {
   520  	ret := _m.Called(path)
   521  
   522  	var r0 string
   523  	if rf, ok := ret.Get(0).(func(string) string); ok {
   524  		r0 = rf(path)
   525  	} else {
   526  		r0 = ret.Get(0).(string)
   527  	}
   528  
   529  	return r0
   530  }
   531  
   532  // Publishes provides a mock function with given fields: packageName, paths, groups
   533  func (_m *Application) Publishes(packageName string, paths map[string]string, groups ...string) {
   534  	_va := make([]interface{}, len(groups))
   535  	for _i := range groups {
   536  		_va[_i] = groups[_i]
   537  	}
   538  	var _ca []interface{}
   539  	_ca = append(_ca, packageName, paths)
   540  	_ca = append(_ca, _va...)
   541  	_m.Called(_ca...)
   542  }
   543  
   544  // Singleton provides a mock function with given fields: key, callback
   545  func (_m *Application) Singleton(key interface{}, callback func(foundation.Application) (interface{}, error)) {
   546  	_m.Called(key, callback)
   547  }
   548  
   549  // StoragePath provides a mock function with given fields: path
   550  func (_m *Application) StoragePath(path string) string {
   551  	ret := _m.Called(path)
   552  
   553  	var r0 string
   554  	if rf, ok := ret.Get(0).(func(string) string); ok {
   555  		r0 = rf(path)
   556  	} else {
   557  		r0 = ret.Get(0).(string)
   558  	}
   559  
   560  	return r0
   561  }
   562  
   563  type mockConstructorTestingTNewApplication interface {
   564  	mock.TestingT
   565  	Cleanup(func())
   566  }
   567  
   568  // NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   569  func NewApplication(t mockConstructorTestingTNewApplication) *Application {
   570  	mock := &Application{}
   571  	mock.Mock.Test(t)
   572  
   573  	t.Cleanup(func() { mock.AssertExpectations(t) })
   574  
   575  	return mock
   576  }