Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit d803529

Browse files
committed
Update tests for Laravel 10
References biigle/core#665
1 parent 7430b7e commit d803529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Http/Controllers/Api/Import/ImportControllerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testStore()
3030
$user = UserTest::create();
3131
$path = (new UserExport([$user->id]))->getArchive();
3232

33-
$wrongFile = new UploadedFile($path, 'file.txt', 'text/plain', null, true);
33+
$wrongFile = UploadedFile::fake()->create('file.txt', 10, 'text/plain');
3434
$file = new UploadedFile($path, 'biigle_user_export.zip', 'application/zip', null, true);
3535

3636
$this->doTestApiRoute('POST', '/api/v1/import');
@@ -41,7 +41,7 @@ public function testStore()
4141
$this->beGlobalAdmin();
4242
$this->json('POST', '/api/v1/import')->assertStatus(422);
4343

44-
$this->json('POST', '/api/v1/import', [], [], ['archive' => $wrongFile])
44+
$this->json('POST', '/api/v1/import', ['archive' => $wrongFile])
4545
->assertStatus(422);
4646

4747
$this->call('POST', '/api/v1/import', [], [], ['archive' => $file])

0 commit comments

Comments
 (0)