I am really confused as to how PhpStorm runs tests with Docker.
I have a Docker container that runs this command on "build" (using Lando as a wrapper):
apt-get install locales locales-all -y
When I spin up the container and run the PHPUnit tests through CLI, everything works and all tests pass.
However, I can't run those tests successfully in PhpStorm, since the locales don't appear to be installed and one of them is required for testing. To confirm this, I put
... inside the test source, I get only
Clearly, PhpStorm is not using the container (or the volume?). Even more strange is that I can run tests in PhpStorm without the Docker container being up. If I run "docker container ls", there are zero containers online. However, PhpStorm can still run the test (and fail at it, bc of the locale not being installed).
It's bizarre since if I change the --net parameter to something random, I get the following error:
So it appears the --net parameter must be something valid, even though it appears the actual container with that network ID is not used. Even when it is set correctly, the container is not up and PhpStorm can run the test!
This is the package that is being tested https://github.com/DataLinx/gettext-context and this is the test that is being run.
Below are screenshots of how I have things in PhpStorm. What am I missing?
Thanks in advance :)