aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_functional_test_case.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2014-02-20 20:51:58 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2014-02-20 20:51:58 -0600
commitb8d30bfc80b5127c5dab1bfe18035e70d77bb7aa (patch)
tree5d98c8885b224379e837e2a4d5e14924fa1585f3 /tests/test_framework/phpbb_functional_test_case.php
parent92cf69abecbfa26030da2937d06d170905f88f7d (diff)
parent09a17b4944da95a5e3e3104541994babaa37f455 (diff)
downloadforums-b8d30bfc80b5127c5dab1bfe18035e70d77bb7aa.tar
forums-b8d30bfc80b5127c5dab1bfe18035e70d77bb7aa.tar.gz
forums-b8d30bfc80b5127c5dab1bfe18035e70d77bb7aa.tar.bz2
forums-b8d30bfc80b5127c5dab1bfe18035e70d77bb7aa.tar.xz
forums-b8d30bfc80b5127c5dab1bfe18035e70d77bb7aa.zip
Merge pull request #2021 from nickvergessen/ticket/12171
Ticket/12171 Attachments from soft-deleted posts are still downloadable
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 55f9cdb947..e40efdec03 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -928,6 +928,23 @@ class phpbb_functional_test_case extends phpbb_test_case
$crawler = self::request('GET', $posting_url);
$this->assertContains($this->lang($posting_contains), $crawler->filter('html')->text());
+ if (!empty($form_data['upload_files']))
+ {
+ for ($i = 0; $i < $form_data['upload_files']; $i++)
+ {
+ $file = array(
+ 'tmp_name' => __DIR__ . '/../functional/fixtures/files/valid.jpg',
+ 'name' => 'valid.jpg',
+ 'type' => 'image/jpeg',
+ 'size' => filesize(__DIR__ . '/../functional/fixtures/files/valid.jpg'),
+ 'error' => UPLOAD_ERR_OK,
+ );
+
+ $crawler = self::$client->request('POST', $posting_url, array('add_file' => $this->lang('ADD_FILE')), array('fileupload' => $file));
+ }
+ unset($form_data['upload_files']);
+ }
+
$hidden_fields = array(
$crawler->filter('[type="hidden"]')->each(function ($node, $i) {
return array('name' => $node->attr('name'), 'value' => $node->attr('value'));