mirror of
https://github.com/filegator/filegator.git
synced 2025-08-18 07:11:27 +02:00
issue with php8.1 and new full_path key found in $_FILES, fixes #295
This commit is contained in:
@@ -156,6 +156,31 @@ class UploadTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function testUploadInvalidFile()
|
||||
{
|
||||
$this->signIn('john@example.com', 'john123');
|
||||
|
||||
$file = [
|
||||
'tmp_name' => TEST_FILE,
|
||||
'full_path' => 'something', // new in php 8.1
|
||||
'name' => 'something',
|
||||
'type' => 'application/octet-stream',
|
||||
'size' => 12345,
|
||||
'error' => 0,
|
||||
];
|
||||
|
||||
$files = ['file' => $file];
|
||||
$data = [];
|
||||
|
||||
$this->sendRequest('GET', '/upload', $data, $files);
|
||||
|
||||
$this->assertStatus(204);
|
||||
|
||||
$this->sendRequest('POST', '/upload', $data, $files);
|
||||
|
||||
$this->assertStatus(422);
|
||||
}
|
||||
|
||||
public function testUploadFileBiggerThanAllowed()
|
||||
{
|
||||
$this->signIn('john@example.com', 'john123');
|
||||
|
Reference in New Issue
Block a user