diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-04-03 18:26:39 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-04-04 11:48:41 +0200 |
commit | 91c3ad07eca3c755fd3be839af2956457e05d10f (patch) | |
tree | a7b77e0dc03d72d431e84aca903fb94c88aae506 /tests/upload/filespec_test.php | |
parent | e4e3df0b37ea6a67ba6c5b4cd98850e0d2758723 (diff) | |
download | forums-91c3ad07eca3c755fd3be839af2956457e05d10f.tar forums-91c3ad07eca3c755fd3be839af2956457e05d10f.tar.gz forums-91c3ad07eca3c755fd3be839af2956457e05d10f.tar.bz2 forums-91c3ad07eca3c755fd3be839af2956457e05d10f.tar.xz forums-91c3ad07eca3c755fd3be839af2956457e05d10f.zip |
[ticket/10851] Add unit and functional tests for checking attachments
These tests will make sure that fileuploads now work as expected regarding
the check for disallowed content.
PHPBB3-10851
Diffstat (limited to 'tests/upload/filespec_test.php')
-rw-r--r-- | tests/upload/filespec_test.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php index 87cd00197f..492f31cee6 100644 --- a/tests/upload/filespec_test.php +++ b/tests/upload/filespec_test.php @@ -143,6 +143,8 @@ class phpbb_filespec_test extends phpbb_test_case $disallowed_content = explode('|', $this->config['mime_triggers']); $filespec = $this->get_filespec(array('tmp_name' => $this->path . $filename)); $this->assertEquals($expected, $filespec->check_content($disallowed_content)); + // All files should pass if $disallowed_content is empty + $this->assertEquals(true, $filespec->check_content(array())); } public function clean_filename_variables() |