warden icon indicating copy to clipboard operation
warden copied to clipboard

Use PHPStorm Test runner for phpunit tests

Open norgeindian opened this issue 3 years ago • 7 comments

Is there any way to use the default PHPStorm test runner to run PHPUnit tests directly in the IDE? I followed https://alejandrocelaya.blog/2017/02/01/run-phpunit-tests-inside-docker-container-from-phpstorm/, which makes it possible to use a PHP interpreter from a docker image, but when I set up everything like written down there, I directly get the error message Unknown MySQL server host 'tmp-mysql'. That makes sense, as PHPStorm can not connect to our DB from outside. Is there any approach to that?

norgeindian avatar Jun 21 '21 06:06 norgeindian

Just an untested idea: you could generate a docker-compose file using warden env config > docker-compose.yaml. Then you could assign a remote interpreter from Docker Compose in PhpStorm.

tdgroot avatar Jun 21 '21 07:06 tdgroot

This comment in #21 explains how to set it up. Be aware that I am having a lot of issues with it, though, including long run times and random exits without errors.

JosephLeedy avatar Jun 22 '21 18:06 JosephLeedy

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Sep 20 '21 19:09 stale[bot]

It would be awesome, if an explanation how to set it up could be added to the docs.

norgeindian avatar Sep 21 '21 01:09 norgeindian

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Dec 20 '21 04:12 stale[bot]

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

+1. Would really appreciate a stable solution described in the docs

novikor avatar Dec 31 '21 12:12 novikor

Going to try to bump this, I've been trying to get this to work for some time and I'm at my wit's end.

lfolco avatar Jul 24 '22 15:07 lfolco