Laravel 5.2测试:测试未运行 [英] Laravel 5.2 Testing : Test is not running

查看:44
本文介绍了Laravel 5.2测试:测试未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过终端使用命令创建了一个测试:

I have create a test via terminal with command :

php artisan make:test UserTest

现在我要使用以下命令运行测试:

Now i want to run the test with the following command :

vendor/bin/UserTest

但是它返回

bash:vendor/bin/UserTest:没有这样的文件或目录

PHPunit已安装.我已经检查了.

PHPunit is Installed. I have checked.

我想念什么吗?

推荐答案

使用Laravel根项目目录中的以下命令运行测试:

Run tests with this command from Laravel root project directory:

vendor/bin/phpunit

如果要运行自定义程序包测试,请使用:

If you want to run custom package tests, use:

vendor/bin/phpunit packages/name/package/

这篇关于Laravel 5.2测试:测试未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆