1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-29 18:50:25 +02:00

[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
This commit is contained in:
Andy Chase 2013-08-05 10:35:39 -07:00
parent 0121de56d4
commit 2508439b02
3 changed files with 3 additions and 3 deletions

0
phpBB/develop/blank.gif Normal file
View File

0
phpBB/develop/blank.jpg Normal file
View File

View File

@ -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]);
}