diff options
author | Andy Chase <asperous2@gmail.com> | 2013-08-05 10:35:39 -0700 |
---|---|---|
committer | Andy Chase <asperous2@gmail.com> | 2013-08-06 12:39:28 -0700 |
commit | 2508439b02f5115e0557b2eee467e5ec5737d350 (patch) | |
tree | d235721e8b7a7205bddd80686da3439b4751f0a7 | |
parent | 0121de56d4e4e7a535c7eb44df5b120412b4ac1b (diff) | |
download | forums-2508439b02f5115e0557b2eee467e5ec5737d350.tar forums-2508439b02f5115e0557b2eee467e5ec5737d350.tar.gz forums-2508439b02f5115e0557b2eee467e5ec5737d350.tar.bz2 forums-2508439b02f5115e0557b2eee467e5ec5737d350.tar.xz forums-2508439b02f5115e0557b2eee467e5ec5737d350.zip |
[ticket/11761] Serve blank file locally in functional test
Example.org no longer serves blank responses, failing functional tests.
this patch creates a blank file and serve it locally during the test,
instead of hitting the http://example.org servers kindly provided by IANA.
PHPBB3-11761
-rw-r--r-- | phpBB/develop/blank.gif | 0 | ||||
-rw-r--r-- | phpBB/develop/blank.jpg | 0 | ||||
-rw-r--r-- | tests/functional/fileupload_remote_test.php | 6 |
3 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/develop/blank.gif b/phpBB/develop/blank.gif new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/phpBB/develop/blank.gif diff --git a/phpBB/develop/blank.jpg b/phpBB/develop/blank.jpg new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/phpBB/develop/blank.jpg diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php index 8e361ab77b..65c4b6b7c4 100644 --- a/tests/functional/fileupload_remote_test.php +++ b/tests/functional/fileupload_remote_test.php @@ -44,14 +44,14 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case public function test_invalid_extension() { $upload = new fileupload('', array('jpg'), 100); - $file = $upload->remote_upload('http://example.com/image.gif'); + $file = $upload->remote_upload(self::$root_url . 'develop/blank.gif'); $this->assertEquals('URL_INVALID', $file->error[0]); } - public function test_non_existant() + public function test_empty_file() { $upload = new fileupload('', array('jpg'), 100); - $file = $upload->remote_upload('http://example.com/image.jpg'); + $file = $upload->remote_upload(self::$root_url . 'develop/blank.jpg'); $this->assertEquals('EMPTY_REMOTE_DATA', $file->error[0]); } |