mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/13904] Move remote upload to its own type class
PHPBB3-13904
This commit is contained in:
@@ -73,7 +73,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
|
||||
$upload->set_error_prefix('')
|
||||
->set_allowed_extensions(array('jpg'))
|
||||
->set_max_filesize(100);
|
||||
$file = $upload->remote_upload(self::$root_url . 'develop/blank.gif');
|
||||
$file = $upload->handle_upload('remote', self::$root_url . 'develop/blank.gif');
|
||||
$this->assertEquals('URL_INVALID', $file->error[0]);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
|
||||
$upload->set_error_prefix('')
|
||||
->set_allowed_extensions(array('jpg'))
|
||||
->set_max_filesize(100);
|
||||
$file = $upload->remote_upload(self::$root_url . 'develop/blank.jpg');
|
||||
$file = $upload->handle_upload('remote', self::$root_url . 'develop/blank.jpg');
|
||||
$this->assertEquals('EMPTY_REMOTE_DATA', $file->error[0]);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
|
||||
$upload->set_error_prefix('')
|
||||
->set_allowed_extensions(array('gif'))
|
||||
->set_max_filesize(1000);
|
||||
$file = $upload->remote_upload(self::$root_url . 'styles/prosilver/theme/images/forum_read.gif');
|
||||
$file = $upload->handle_upload('remote', self::$root_url . 'styles/prosilver/theme/images/forum_read.gif');
|
||||
$this->assertEquals(0, sizeof($file->error));
|
||||
$this->assertTrue(file_exists($file->filename));
|
||||
}
|
||||
@@ -107,7 +107,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
|
||||
$upload->set_error_prefix('')
|
||||
->set_allowed_extensions(array('gif'))
|
||||
->set_max_filesize(100);
|
||||
$file = $upload->remote_upload(self::$root_url . 'styles/prosilver/theme/images/forum_read.gif');
|
||||
$file = $upload->handle_upload('remote', self::$root_url . 'styles/prosilver/theme/images/forum_read.gif');
|
||||
$this->assertEquals(1, sizeof($file->error));
|
||||
$this->assertEquals('WRONG_FILESIZE', $file->error[0]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user