这是我对商店功能的测试
/** @test */
public function storeTest()
{
$this->be($this->user);
$response = $this->json('POST', '/client/ocp/profile/247/route-', [
'name' => 'Test store',
'speed' => 4.5,
'created_by' => $this->user->id,
'client_id' => '262',
]);
$response
->seeStatusCode(302)
->seeJson(['status' => 'OK']);
}
当我运行它时出现此错误
Invalid JSON was returned from the route. Perhaps an exception was thrown?
我尝试添加此标题以解决问题 [' X-请求-随着' => ' XMLHttpRequest的'] 但它没有解决
我怎么能解决这个问题?