IOC Container Bindings are not available in Unit Test #41887
Unanswered
arsalan-onschedule
asked this question in
Q&A
Replies: 1 comment
-
Are you extending the right |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have bound an Interface in IOC Container using Service provider, I found it working while resolving it using tinker but when I use it in unit test it doesn't find any binding. Could someone help me to resolve this issue.
Thanks in advance.
Code in service provider.
Code in service class
Code in unit test class
When i dd(app()->getBindings()) in tinker i get all of my bindings along with core framework, but when i dd(app()->getBindings()) i get an empty list.
Beta Was this translation helpful? Give feedback.
All reactions