Closed
Description
Symfony version(s) affected: 4.1.0
Description
Service test.service_container
does not respect the output of kernel's getContainerBaseClass
method.
Therefore, when FrameworkBundle's Client
returns it on getContainer
, we receive an instance of TestContainer
instead of SomeCustomContainer
. This makes it impossible to call a custom method added to the container (in our case - https://github.com/PolishSymfonyCommunity/SymfonyMockerContainer).
How to reproduce
Either:
- Define custom container base class and call a method on custom container coming from FrameworkBundle's
Client
. - Install Sylius v1.2.0-BETA and try to run phpunit tests.
Possible solution
Adding a __call
method on TestContainer which passes unknown calls to TestContainer
's public container.
Additional context
I'm up to making a PR fixing it (using the solution proposed above), but not before Wednesday, and I don't mind anyone fixing it before that :)
Metadata
Metadata
Assignees
Labels
No labels