Summer Sale! All accounts are 50% off this week.

amir5's avatar
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?

0 likes
0 replies

Please or to participate in this conversation.