讨论数量: 36
![](https://cdn.learnku.com/uploads/avatars/15986_1493538569.jpeg!/both/100x100)
单元测试 报 Cannot redeclare?
![](https://cdn.learnku.com/uploads/avatars/21255_1533986055.jpg!/both/100x100)
直接运行 phpunit 爆出这个错误
![](https://cdn.learnku.com/uploads/avatars/17812_1500710054.jpeg!/both/100x100)
单元测试无法运行?
![](https://cdn.learnku.com/uploads/avatars/19021_1505463922.jpeg!/both/100x100)
比如我在 tests/Feature/ 创建两个测试文件,请问有没有一种命令可以指定某个测试文件执行。
![](https://cdn.learnku.com/uploads/avatars/48926_1568281358.jpeg!/both/100x100)
首次运行 phpunit 报错 Expected status code 201 but received 500 的解决方案。
![](https://cdn.learnku.com/uploads/avatars/23219_1524471993.png!/both/100x100)
运行 phpunit 提示 No tests executed 解决方法
![](https://cdn.learnku.com/uploads/avatars/10791_1516690346.jpg!/both/100x100)
phpunit 运行问题?
![](https://cdn.learnku.com/uploads/avatars/21878_1517373086.jpg!/both/100x100)
API 集成测试?
![](https://cdn.learnku.com/uploads/images/201801/03/1/jPmB4CQVh5.jpg)
phpunit 运行不通过?
![](https://cdn.learnku.com/uploads/avatars/20514_1513130417.jpeg!/both/100x100)
发布话题 一系列的报错
![](https://cdn.learnku.com/uploads/avatars/8164_1689660667.jpg!/both/100x100)
Laravel 功能测试使用测试数据库,jwt-auth 的 token 授权一直 401?
![](https://cdn.learnku.com/uploads/avatars/15986_1493538569.jpeg!/both/100x100)
最后一步 testDeleteTopic 报错?
![](https://cdn.learnku.com/uploads/avatars/23421_1524576583.jpeg!/both/100x100)
phpunit not install 的解决办法
![](https://cdn.learnku.com/uploads/avatars/3965_1469534765.jpg!/both/100x100)
更新话题 middleware 验证无法通过?
![](https://cdn.learnku.com/uploads/avatars/15986_1493538569.jpeg!/both/100x100)
单元测试 修改话题错误?
![](https://cdn.learnku.com/uploads/avatars/46657_1565072467.jpeg!/both/100x100)
命令行上运行 phpunit 测试出错
![](https://cdn.learnku.com/uploads/avatars/21871_1517363888.jpg!/both/100x100)
testStoreTopic 的断言响应状态码是不是应该设成 200
![](https://cdn.learnku.com/uploads/avatars/20716_1563896111.png!/both/100x100)
testUpdateTopic () 中使用 clean () 遇到问题没搞明白?
![](https://cdn.learnku.com/uploads/avatars/30309_1545708136.jpeg!/both/100x100)
老师帮我看看测试话题详情有问题,什么问题呢?
![](https://cdn.learnku.com/uploads/avatars/28043_1533028112.jpeg!/both/100x100)
测试修改话题报错:Unable to locate factory with name [default]?
![](https://cdn.learnku.com/uploads/avatars/25170_1527580865.jpg!/both/100x100)
Error: Call to undefined function Tests\Feature\clean () ?
![](https://cdn.learnku.com/uploads/avatars/56636_1579101352.jpeg!/both/100x100)
本章节用phpunit命令伴随清空表的操作
![](https://cdn.learnku.com/uploads/avatars/72853_1605451712.jpeg!/both/100x100)
phpunit 测试完成后,数据库被清空了?
![](https://cdn.learnku.com/uploads/avatars/22620_1574587337.jpeg!/both/100x100)
Laradock 下无法运行 phpunit
![](https://cdn.learnku.com/uploads/avatars/28926_1534864782.jpeg!/both/100x100)
6.*版本测试修改话题失败,但不知道出现问题的原因。
![](https://cdn.learnku.com/uploads/avatars/21326_1516590004.gif!/both/100x100)
setUp () 方法要设置返回值类型声明
![](https://cdn.learnku.com/uploads/avatars/11800_1487771670.jpeg!/both/100x100)
这里有个坑,是上一个课程挖下的
![](https://cdn.learnku.com/uploads/avatars/20047_1519798224.jpg!/both/100x100)
老师,我在本节前面讲的执行 phpunit 命令时报如下错误,无法解决
![](https://cdn.learnku.com/uploads/images/201801/03/1/LK3fRYxE15.jpg)
事实上每次都创建一些新的资源会不会不是很好?
![](https://cdn.learnku.com/uploads/avatars/26214_1528894515.jpeg!/both/100x100)
按照你上面的要求,找了很多质料都,没有解决?代码也用了你线上代码
![](https://cdn.learnku.com/uploads/avatars/19021_1505463922.jpeg!/both/100x100)
断言函数的返回值内容是和 transformer 作比较吗?
![](https://cdn.learnku.com/uploads/avatars/12861_1600839581.jpg!/both/100x100)
删除话题 最后断言 404 失败?
![](https://cdn.learnku.com/uploads/avatars/21035_1515642345.jpg!/both/100x100)
Laravel 教程 - 实战构架 API 服务器 ,10.2. Laravel API 集成测试,少引入了 TestCase 类?
![](https://cdn.learnku.com/uploads/avatars/15729_1493108308.png!/both/100x100)
BadMethodCallException: Method wrap does not exist?求教
![](https://cdn.learnku.com/uploads/images/201801/03/1/o9NW9VelF3.jpg)
测试更新话题、展示话题、报错
![](https://cdn.learnku.com/uploads/avatars/51680_1572237824.jpeg!/both/100x100)
Laravel API 集成测试