-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Description
When using the KernelTestCase
and asking PhpStan to analyze a test, I have this error:
However, the static::$container
that is in the KernelTestCase
is supposed to be an instance of the TestContainer
but is typed as ContainerInterface
because it might happen that the test.container
service can be absent from the container, therefore making static::$container
be the full container (as of KernelTestCase here )
Here is the code that triggers the error: Pierstoval/AgateApps/.../RedeemerTest.php#L61-L79
If the test.container
service exists in the container AND for this specific case, I think there shouldn't be any error.
karser, ste93cry, localheinz, Wirone, mitelg and 3 moreKocal
Metadata
Metadata
Assignees
Labels
No labels