PhpStorm 2016.3.3 does not find a test class with PHPUnit 6.0. *

I want to run PHPUnit 6.0. * tests in PhpStorm. But this shows me the following error when I want to run tests of one class: "Test class is not specified or is invalid."

Startup / Debug Configuration with Error Message

I downloaded PHPUnit using Composer. Here is the content composer.json:

{
  "require": {
    "phpunit/phpunit": "6.0.0"
  }
}

Running a test on the command line works. Output:

/usr/bin/php7.1 /path/to/project/vendor/phpunit/phpunit/phpunit --no-configuration MyTestTest /path/to/project/Tests/MyTestTest.php
PHPUnit 6.0.0 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 29 ms, Memory: 2.00MB

OK (1 test, 1 assertion)

Additional Information:

  • PhpStorm Settings:
    • PHP language level: 7.1
    • CLI Interpreter: 7.1
    • PHPUnit uses Composer autoloader (link to autoload.php)
  • PhpStorm Version: 2016.3.3

Tested with 6.0.0 and 6.0.10. Assume all versions are 6.0. * Affected.

5.7.17 ( 6.0.0), . , , , , ( ).

? PhpStorm?

PhpStorm. PhpStorm

, - .

+4
1

PhpUnit 6 PhpStorm 2017.1. Release Candidate. https://www.jetbrains.com/phpstorm/nextversion/index.html

+3

Source: https://habr.com/ru/post/1672927/


All Articles