mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 07:47:34 +02:00
[ticket/14442] Properly set plupload header
PHPBB3-14442
This commit is contained in:
@@ -134,7 +134,8 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
|
|||||||
'error' => UPLOAD_ERR_OK,
|
'error' => UPLOAD_ERR_OK,
|
||||||
);
|
);
|
||||||
|
|
||||||
$crawler = self::$client->request(
|
self::$client->setServerParameter('HTTP_X_PHPBB_USING_PLUPLOAD', '1');
|
||||||
|
self::$client->request(
|
||||||
'POST',
|
'POST',
|
||||||
$url . '&sid=' . $this->sid,
|
$url . '&sid=' . $this->sid,
|
||||||
array(
|
array(
|
||||||
@@ -144,11 +145,10 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case
|
|||||||
'real_filename' => 'valid.jpg',
|
'real_filename' => 'valid.jpg',
|
||||||
'add_file' => $this->lang('ADD_FILE'),
|
'add_file' => $this->lang('ADD_FILE'),
|
||||||
),
|
),
|
||||||
array('fileupload' => $file),
|
array('fileupload' => $file)
|
||||||
array('X-PHPBB-USING-PLUPLOAD' => '1')
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$response = json_decode((string) self::get_content(), true);
|
$response = json_decode(self::get_content(), true);
|
||||||
$this->assertEquals('valid.jpg', $response['data'][0]['real_filename']);
|
$this->assertEquals('valid.jpg', $response['data'][0]['real_filename']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user