[英]PHPUnit in PhpStorm
Phpunit introduced the namespace PHPUnit\\Framework\\TestCase
with Version 6, early 2017 (see https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-6.0.0 ). Phpunit 在 2017 年初的版本 6 中引入了命名空间
PHPUnit\\Framework\\TestCase
(参见https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-6.0.0 )。
Check your PhpStorm settings, probably you configured a version prior to 6.0.0, so PhpStorm doesn't know that namespace.检查您的 PhpStorm 设置,可能您配置了 6.0.0 之前的版本,因此 PhpStorm 不知道该命名空间。
I had the same error.我有同样的错误。 using phpunit.phar file
使用 phpunit.phar 文件
I fixed adding the file as External library screenshot我修复了将文件添加为外部库屏幕截图
I have several versions of phar so I just selected "exclude phar from project" in the other files.我有几个版本的 phar,所以我只是在其他文件中选择了“从项目中排除 phar”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.