when i exit from docker i can run tests in the testing database from phpstorm in local machine.
Tests\ExampleTest this was an example not the test I run.
Oh, then that is the issue. Docker can not see the database which is not defined within it. Docker is an isolated environment. You need to create a database inside docker for it to use it during testing.
I'm not using LaraDock, but I basically have same setup and it works just fine. You are probably missing something. Seems like you do not quite understand accessibility within virtual networking. Maybe try to explain better here what is your exact setup so suggestions can be made and hopefully the issue can be resolved.
After created you should add link ( Links section ) which one do u want to use ( mysql, redis) to docker container (click Browse in docker container section)
And if you know which network is using in docker container you should write name of network ( docker network ls ) into Network Mode section then click OK . That’s it.
But if you don’t know which network is using . First you should remove all unused networks ( docker network prune ) then run ( docker network ls )