diff options
author | Andreas Fischer <bantu@phpbb.com> | 2015-01-21 16:59:26 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2015-01-21 16:59:26 +0100 |
commit | a737eeb6cea2d494be4c8ae5e1101d1015746191 (patch) | |
tree | ecd111ea5c6b78ff7a3d50c7304bfff9cf615672 /tests/functional | |
parent | 7ed065a630abab7ca1978e23eaa393130ed2c550 (diff) | |
parent | 7d6fdcfaa597b96b97a82829d2491f1d2b284cb8 (diff) | |
download | forums-a737eeb6cea2d494be4c8ae5e1101d1015746191.tar forums-a737eeb6cea2d494be4c8ae5e1101d1015746191.tar.gz forums-a737eeb6cea2d494be4c8ae5e1101d1015746191.tar.bz2 forums-a737eeb6cea2d494be4c8ae5e1101d1015746191.tar.xz forums-a737eeb6cea2d494be4c8ae5e1101d1015746191.zip |
Merge pull request #3320 from marc1706/ticket/13534
[ticket/13534] Set imagick path to empty string to prevent failing path ...
* marc1706/ticket/13534:
[ticket/13534] Set imagick path to empty string to prevent failing path check
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/fileupload_form_test.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php index b8c48389e0..d381fa1ae2 100644 --- a/tests/functional/fileupload_form_test.php +++ b/tests/functional/fileupload_form_test.php @@ -93,23 +93,32 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case $this->login(); $this->admin_login(); $this->add_lang('ucp'); - $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_attachments&mode=attach'); - $form = $crawler->selectButton('Submit')->form(); - $values = $form->getValues(); + // Make sure check_attachment_content is set to false + $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_attachments&mode=attach'); - $values["config[check_attachment_content]"] = 0; - $form->setValues($values); - $crawler = self::submit($form); + $form = $crawler->selectButton('Submit')->form(array( + 'config[check_attachment_content]' => 0, + 'config[img_imagick]' => '', + )); + self::submit($form); // Request index for correct URL - $crawler = self::request('GET', 'index.php?sid=' . $this->sid); + self::request('GET', 'index.php?sid=' . $this->sid); $crawler = $this->upload_file('disallowed.jpg', 'image/jpeg'); // Hitting the UNABLE_GET_IMAGE_SIZE error means we passed the // DISALLOWED_CONTENT check $this->assertContainsLang('UNABLE_GET_IMAGE_SIZE', $crawler->text()); + + // Reset check_attachment_content to default (enabled) + $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_attachments&mode=attach'); + + $form = $crawler->selectButton('Submit')->form(array( + 'config[check_attachment_content]' => 1, + )); + self::submit($form); } public function test_too_large() |