test in PHPStorm 2016.1.2:

enter image description here enter image description here

When performing tests, it gives:

/usr/bin/php /tmp/ide-phpunit.php --configuration /home/makson/IDEA/php/PhpstormProjects/Server/application/autoloader/autoload.php /home/makson/IDEA/php/PhpstormProjects/Server/application/test Testing started at 18:35 ... Could not load "/home/makson/IDEA/php/PhpstormProjects/Server/application/autoloader/autoload.php". ParsePI: PI php never end ... Start tag expected, '<' not found 

Tell me what to do before you configure the tests to work properly.

  • He swears to you on the file. Watched that in it? Does he exist? - Ivan Pshenitsyn
  • @ Ivan Pshenitsyn exists, I know what's in it. self-written autoloader for namespace - makson

1 answer 1

The problem in my case was that I incorrectly specified an alternative configuration file, I indicated the path to the autoloader. After creating phpunit.xml everything works phpunit.xml .

 <?xml version="1.0" encoding="utf-8"?> <phpunit bootstrap="path/to/autoload.php" colors="true"> <testsuites> <testsuite name="Main"> <directory>test</directory> </testsuite>