Mocking LoggerInterface in CommandTester #54701
Unanswered
tyteen4a03
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use the PSR logger in my command and I would like to be able to mock it so that I can monitor its outputs. However, when I have this:
It tells me that:
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException : The "Psr\Log\LoggerInterface" service is already initialized, you cannot replace it.
.How can I replace the dependency in this case?
Beta Was this translation helpful? Give feedback.
All reactions