mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14442] Properly set plupload header
PHPBB3-14442
This commit is contained in:
parent
105ffe8da3
commit
2353fe39c0
1 changed files with 4 additions and 4 deletions
|
@ -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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue