My current setup is: PhpStorm, Docker WSL, Ubuntu (WSL). All my project files are local and inside WSL Ubuntu. Docker Container and CLI Interpreters are set up on PhpStorm.
It seems to recognize PHP inside my 'php-fpm' container (it pulls the PHP info). When I run PHPUnit test it looks like it connects to my container.
If I understand correctly, PhpStorm is mounting my project files from WSL Ubuntu into a new container that uses the Docker Container 'php-fpm' to run the unit tests? But it doesn't seem to mount my project files inside the Unit test container. I get the following error:
Testing started at 11:54 AM ...
[docker://laradock/php-fpm:latest-7.3/]:php /opt/.phpstorm_helpers/phpunit.php --no-configuration --filter Tests\\Feature\\ExampleTest --test-suffix ExampleTest.php /opt/project/tests/Feature
The value of autoloader is specified, but file doesn't exist '/opt/project/vendor/autoload.php'
Process finished with exit code 1
When I manually start up the Docker container (via Docker Desktop) PhpStorm created and get into the bash, there's no files in /opt/project but has /opt/.phpstorm_helpers/phpunit.php. Which therein lies the problem. The actual project files that my Docker has mounted from WSL are in /var/www. I've tried changing the Path Mappings to point to those files but still get the same error.
Any suggestions appreciated.










