Lumen 5.5 JSON API File Upload test breaks with UploadedFile
问题 I am building a file upload JSON API with Lumen and trying to write phpunit API tests. The problem I am having though is that as soon as I try to simulate a file upload with a real image constructed like ["file" => new UploadedFile(TestUtils::tempPath('test.jpg'), 'test.jpg', "image\jpeg", 100, null, true)] and sending it via $this->json('POST', '/chunk', $data); , I can't do anything with the uploaded file because it is an array and I get the error Call to a member function move() on array