You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my bundle (call it bundle A) I've private service which will be type-hinted in other bundles, but not in bundle A.
Is there optimal way to write tests for this service in bundle A?
The text was updated successfully, but these errors were encountered:
Hi, yes: in your test configuration you can create a public alias to this service, then access it through this alias. I'd recommend to name the alias by prefixing the aliased service with the test. prefix.
Doc PR welcome if you'd like to improve it.
In Symfony 4.1 appeared nice feature: https://symfony.com/blog/new-in-symfony-4-1-simpler-service-testing
As mentioned symfony/symfony#26499 (comment) removing unused private services from
test.service_container
is intended behaviour.In my bundle (call it bundle A) I've private service which will be type-hinted in other bundles, but not in bundle A.
Is there optimal way to write tests for this service in bundle A?
The text was updated successfully, but these errors were encountered: