Mar 14, 2024
0
Level 7
How mock prevents type hinting failure
When swapping classes with fake class with laravel's DI, I have to use interfaces because of type hins. But when using mocks there's no need for interfaces, how is that possible? and why not create such classes to prevent creating interfaces?
Please or to participate in this conversation.