1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-07 16:15:22 +02:00

Merge branch 'develop-ascraeus' into develop

* develop-ascraeus:
  [ticket/13534] Set imagick path to empty string to prevent failing path check
This commit is contained in:
Andreas Fischer 2015-01-21 16:59:26 +01:00
commit 3bbddbb963

View File

@ -93,23 +93,32 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
$this->login(); $this->login();
$this->admin_login(); $this->admin_login();
$this->add_lang('ucp'); $this->add_lang('ucp');
// Make sure check_attachment_content is set to false
$crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_attachments&mode=attach'); $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_attachments&mode=attach');
$form = $crawler->selectButton('Submit')->form(); $form = $crawler->selectButton('Submit')->form(array(
$values = $form->getValues(); 'config[check_attachment_content]' => 0,
'config[img_imagick]' => '',
$values["config[check_attachment_content]"] = 0; ));
$form->setValues($values); self::submit($form);
$crawler = self::submit($form);
// Request index for correct URL // 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'); $crawler = $this->upload_file('disallowed.jpg', 'image/jpeg');
// Hitting the UNABLE_GET_IMAGE_SIZE error means we passed the // Hitting the UNABLE_GET_IMAGE_SIZE error means we passed the
// DISALLOWED_CONTENT check // DISALLOWED_CONTENT check
$this->assertContainsLang('UNABLE_GET_IMAGE_SIZE', $crawler->text()); $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() public function test_too_large()