Not able to run tests using PHPUnit and PHP 5.6 under Debian 10 Follow
Hello, I've been trying to run some tests using PHP Storm under a freshly installed Debian 10 with PHP 5.6. Here is some information about it:
When I click run, I receive the following messages:
#1 On the run tab: "Test framework quit unexpectedly"
#2 And also: "Process finished with exit code 127"
#3 If I go to Help > Show Log In Files > idea.log:
com.intellij.execution.ExecutionException: /etc/php/5.6/cli/php.ini: 1: /etc/php/5.6/cli/php.ini: [PHP]: not found
/etc/php/5.6/cli/php.ini: 3: /etc/php/5.6/cli/php.ini: Syntax error: ";;" unexpected
#4 When I go to File > Setting > Test Frameworks it says: PHPUnit version: Not installed

#5 And regarding to the php.ini file, I also replaced the default (the one created during the installation) with the content of another example file I found somewhere else, but the problem is the same.
#6 If I type php -v I get:
PHP 5.6.40-52+0~20210701.54+debian10~1.gbpc0026e (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
#7 phpunit (on the command line) says command not found, but I'm not sure if that's the correct way of checking if PHPUnit is installed. I'm new to php also. And php -m does not show phpunit either, anyway.
Please help. I want to be able to automate my tests before starting the actual development. I also tried to run DefaultControllerTest.php from the command line, but nothing happens. Anyway, thank you all since now.
Please sign in to leave a comment.
Could you please confirm if a PHP CLI Interpreter is added correctly to the IDE and the version is parsed properly? Like:

Vasily, my configuration doesn't look exactly like yours but this is what I've found:
@Gonzalonediani
Click on "..." button on the right (next to the "php_installation_5.6" line in the drop down) -- it will bring the same screen as Vasiliy has.
Andriy Bazanov
@Gonzalonediani
The PHP Interpreter is not fully set up in your PhpStorm.
Your screenshot clearly shows "PHP version: Not installed" error message.
You've provided a path to php.ini when it asks for executable (in the "PHP executable" field)... Why? Fix it.
Thanks a lot! I've figured it out. Now it looks like this:
And it throws this error:
Cannot open file "/home/gonzalonediani/Documentos/gitlab/h2h-platform/h2t/web_panel/./bootstrap.php".
Process finished with exit code 1
How should I create the bootstrap.php file? Anyway that option is not enabled. In idea.log it says:
Please disregard the idea.log error message, it is a red herring here.
I have a somewhat unrelevant question but nonetheless, is there any specific reason why would you prefer to stick to these PHP and PHPUnit versions? I am asking it as 5.6 and 4.8.36 are quite outdated nowadays.
Vasiliy Yur
I'm using PHP 5.6 because that's the PHP version on the RedHat server where the app is installed and being used. But this week a colleague installed this same app in Debian with PHP 7+, he reported a couple of bugs and I don't know if it's due to the different version. Anyway, do you think it's going to be easier to make it work with PHP 7+?
Well, PHPUnit 4.8.36 was released 4 years ago, so from my point of view, it definitely worth upgrading and I am quite convenient that it will be easier to troubleshoot the newer version.
Nonetheless, if PHPUnit still does not work for you, I would recommend collecting log files and contact the support as it could be uneasy to troubleshoot it via the forum board.