简体   繁体   中英

PHPUnit tests in PhpStorm: Cannot open file

Unable to run tests for the specific file, cause PhpStorm adds namespace to the final command

Testing started at 14:36 ...
[sftp://inf@127.0.0.1:22]:/usr/bin/php /mnt/d/MP/mp.kz/phpunit.phar --bootstrap /mnt/d/MP/mp.kz/vendor/autoload.php --configuration /mnt/d/MP/mp.kz/phpunit.xml MP\\Tests\\Auction\\AuctionsListPublicSearchServiceTest /mnt/d/MP/mp.kz/tests/Auction/AuctionsListPublicSearchServiceTest.php --teamcity --cache-result-file=/mnt/d/MP/mp.kz/.phpunit.result.cache
PHPUnit 9.0.1 by Sebastian Bergmann and contributors.

Cannot open file "MP\\Tests\\Auction\\AuctionsListPublicSearchServiceTest".

Process finished with exit code 1

PhpStorm adds namespace to the command line.

If I remove namespace from command line then it works OK:

[SANDBOX]inf@NM0-MP:~$ /usr/bin/php /mnt/d/MP/mp.kz/phpunit.phar --bootstrap /mnt/d/MP/mp.kz/vendor/autoload.php --no-configuration /mnt/d/MP/mp.kz/tests/Auction/AuctionsListPublicSearchServiceTest.php
PHPUnit 9.0.1 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 1.48 seconds, Memory: 18.00 MB

OK (1 test, 3 assertions)
[SANDBOX]inf@NM0-MP:~$

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM