Skip to content

How to test unused private services #9890

Closed
@komik966

Description

@komik966

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    TestingactionableClear and specific issues ready for anyone to take them.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions