我新安装的 Laravel 遇到问题。
当我尝试使用时phpunit
运行默认命令ExampleTest.php
, 我懂了error :
D:\Laravel\Rahimi0151>phpunit
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\php\pear\PHPUnit\TextUI\Command.php on line 277
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\php\pear\PHPUnit\TextUI\Command.php on line 277
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\php\pear\PHPUnit\TextUI\Command.php on line 285
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\php\pear\PHPUnit\TextUI\Command.php on line 285
PHPUnit 3.7.21 by Sebastian Bergmann.
Configuration read from D:\Laravel\Rahimi0151\phpunit.xml
Time: 0 seconds, Memory: 4.00Mb
[30;43m[2KNo tests executed!
[0m[2K
在底部,写着:
No tests executed!
有人可以帮我解决吗?
这里的问题是,您正在运行安装在系统上的 PHPUnit,该系统相当旧,而不是应该为此项目运行的 PHPUnit。
为了确保您运行真正为此项目安装的 PHPUnit,您应该运行:
vendor/bin/phpunit
or
vendor/bin/phpunit.bat
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)