mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/10939] Modified request test slightly to include $_FILES
PHPBB3-10939
This commit is contained in:
parent
74423eaf12
commit
48a0810ea5
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,13 @@ class phpbb_request_test extends phpbb_test_case
|
||||||
$_COOKIE['test'] = 3;
|
$_COOKIE['test'] = 3;
|
||||||
$_REQUEST['test'] = 3;
|
$_REQUEST['test'] = 3;
|
||||||
$_GET['unset'] = '';
|
$_GET['unset'] = '';
|
||||||
|
$_FILES['test'] = array(
|
||||||
|
'name' => 'file',
|
||||||
|
'tmp_name' => 'tmp',
|
||||||
|
'size' => 256,
|
||||||
|
'type' => 'application/octet-stream',
|
||||||
|
'error' => UPLOAD_ERR_OK,
|
||||||
|
);
|
||||||
|
|
||||||
$_SERVER['HTTP_HOST'] = 'example.com';
|
$_SERVER['HTTP_HOST'] = 'example.com';
|
||||||
$_SERVER['HTTP_ACCEPT'] = 'application/json';
|
$_SERVER['HTTP_ACCEPT'] = 'application/json';
|
||||||
|
@ -42,6 +49,7 @@ class phpbb_request_test extends phpbb_test_case
|
||||||
$this->assertEquals(2, $_GET['test'], 'Checking $_GET after enable_super_globals');
|
$this->assertEquals(2, $_GET['test'], 'Checking $_GET after enable_super_globals');
|
||||||
$this->assertEquals(3, $_COOKIE['test'], 'Checking $_COOKIE after enable_super_globals');
|
$this->assertEquals(3, $_COOKIE['test'], 'Checking $_COOKIE after enable_super_globals');
|
||||||
$this->assertEquals(3, $_REQUEST['test'], 'Checking $_REQUEST after enable_super_globals');
|
$this->assertEquals(3, $_REQUEST['test'], 'Checking $_REQUEST after enable_super_globals');
|
||||||
|
$this->assertEquals(256, $_FILES['test']['size']);
|
||||||
|
|
||||||
$_POST['x'] = 2;
|
$_POST['x'] = 2;
|
||||||
$this->assertEquals($_POST, $GLOBALS['_POST'], 'Checking whether $_POST can still be accessed via $GLOBALS[\'_POST\']');
|
$this->assertEquals($_POST, $GLOBALS['_POST'], 'Checking whether $_POST can still be accessed via $GLOBALS[\'_POST\']');
|
||||||
|
|
Loading…
Add table
Reference in a new issue