ouzo
ouzo copied to clipboard
Docs for controller tests with injector
Can we change injector $config in ControllerTestCase to a protected field?
//given
$userService = Mock::create('UserService');
$this->injectorConfig->bind('UserService')->toInstance($userService);
//when
$this->post('/users', [...]);
//then
Mock::verify($userService)->save(...);