【发布时间】:2022-01-21 00:01:59
【问题描述】:
我正在使用 Lumen 8.3,想在我的测试中使用 factory() 函数,它给了我
Undefined Function ,Docs of Lumen 没有什么用处
我错过了什么吗?
class ProductTest extends TestCase
{
public function test_if_can_send_products_list(){
$products = factory('App/Products',5)->make();
$this->json('post','/payouts',$products)
->seeJson([
'created' => true,
]);
}
}
->
Error: Call to undefined function factory()
【问题讨论】:
标签: laravel testing phpunit tdd lumen