phpunit - Laravel Mockery Integration Test -


i little lost on how perform integration test using mockery.

i have following classes: teachercontroller teachermanager - interface teachermanagerimpl - implementation

when comes mockery / phpunit, how call method interface? says interface can not instantiated. know can't how can inject test class or should new on implementation. doing new on implementation not seem right me.

thanks kindari in laravel irc chat room in test setup method bind interface implementation , set private member variable using app::make. see below.

app::bind('foointerface', 'fooimplementation');  $foo = app::make('foointerface'); 

also app() shortcut app::make


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -