找不到TestCase的Laravel致命错误 [英] laravel fatal error for TestCase not found

查看:47
本文介绍了找不到TestCase的Laravel致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://localhost/laravel/app/tests/ExampleTest.php

如果我运行laravel,它将显示以下错误

if i run laravel it shows the following error

致命错误:在第3行的D:\ xampp \ htdocs \ laravel \ app \ tests \ ExampleTest.php中找不到类'TestCase',任何想法

Fatal error: Class 'TestCase' not found in D:\xampp\htdocs\laravel\app\tests\ExampleTest.php on line 3 , any idea

推荐答案

在项目的根目录中运行以下命令

Run following command in your project's root directory

phpunit app/tests/

更新:

如果您的计算机上未安装phpunit,也可以使用以下命令运行.这样最好避免队友之间的版本差异.

You can also run with the following command if phpunit is not installed on your machine. Which is also better to avoid version differences between team mates.

vendor/bin/phpunit

这篇关于找不到TestCase的Laravel致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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