2

What I want

Run PHPUnit by terminal and configuration in PhpStorm

What I Have

Previous problem

Resolved in HERE - about not finding files

File that running

#!/usr/bin/env bash
# echo "Current working directory: '"$(pwd)"'"
cd $(pwd) && docker run --rm -t -v $(pwd):/var/www -e SYMFONY_ENV=dev ezsystems/php:7.1-v1-dev php $@

Summary

When I run this by terminal:

docker-phpez vendor/bin/phpunit --coverage-text

Everything working correctly.

When I try to run this with configuration of PhpStorm, I get warning that: PHP is not installed.

But running this as remote PHP interpreter, gives me:

docker://ezsystems/php:7.1-v1/php /opt/.phpstorm_helpers/phpunit.php --configuration /var/www/phpunit.xml.dist
Testing started at 17:06 ...
The value $_SERVER['IDE_PHPUNIT_PHPUNIT_PHAR'] is specified, but file doesn't exist '/var/www/vendor/bin/phpunit'

Process finished with exit code 1

Looking like mounting doesn't work.

Question:

  • do you know why? How to fix that?

In previous version of PhpStorm I didn't had any problem with that. Right now, I have 2016.3.2.

1
  • 2
    Try newer IDE versions (just in case) -- stable 2017.1.4 and EAP build of 2017.2. Commented Jun 29, 2017 at 15:36

2 Answers 2

1

Because after update you have to update tags for phpstorm_helpers docker image. There i put more how it should be fixed: https://youtrack.jetbrains.com/issue/IDEA-189164

Sign up to request clarification or add additional context in comments.

Comments

0

After updating PHPStorm to 2017.1.4, what I did:

  • switched to docker configuration
  • phpunit loaded from composer's autoload.php

Started to working. Still don't know why docker-phpez not working by PHPStorm, but I will stop for now.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.