aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-12-18 04:11:56 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-12-18 04:11:56 -0500
commit3af5531d0d8df7ed734e688780407014ff1840f8 (patch)
tree635d2dcd8e9c96357d52ca27e8d827910bf7919b /tests
parentda2f0757d777e3b7d34ac65884400ce276d99c9a (diff)
parent4ae0c787828ea34bb927a8346804e52bd25cffac (diff)
downloadforums-3af5531d0d8df7ed734e688780407014ff1840f8.tar
forums-3af5531d0d8df7ed734e688780407014ff1840f8.tar.gz
forums-3af5531d0d8df7ed734e688780407014ff1840f8.tar.bz2
forums-3af5531d0d8df7ed734e688780407014ff1840f8.tar.xz
forums-3af5531d0d8df7ed734e688780407014ff1840f8.zip
Merge PR #1147 branch 'marc1706/ticket/10763' into develop
* marc1706/ticket/10763: [ticket/10763] Use self when calling get_extension() in filespec class [ticket/10763] Make functions for remote avatars static
Diffstat (limited to 'tests')
-rw-r--r--tests/mock/fileupload.php29
-rw-r--r--tests/upload/filespec_test.php3
2 files changed, 1 insertions, 31 deletions
diff --git a/tests/mock/fileupload.php b/tests/mock/fileupload.php
index 409036ba63..cbcbf4a6ab 100644
--- a/tests/mock/fileupload.php
+++ b/tests/mock/fileupload.php
@@ -20,33 +20,4 @@ class phpbb_mock_fileupload
{
return true;
}
-
- /**
- * Copied verbatim from phpBB/includes/functions_upload.php's fileupload
- * class to ensure the correct behaviour of filespec::move_file.
- *
- * Maps file extensions to the constant in second index of the array
- * returned by getimagesize()
- */
- public function image_types()
- {
- return array(
- IMAGETYPE_GIF => array('gif'),
- IMAGETYPE_JPEG => array('jpg', 'jpeg'),
- IMAGETYPE_PNG => array('png'),
- IMAGETYPE_SWF => array('swf'),
- IMAGETYPE_PSD => array('psd'),
- IMAGETYPE_BMP => array('bmp'),
- IMAGETYPE_TIFF_II => array('tif', 'tiff'),
- IMAGETYPE_TIFF_MM => array('tif', 'tiff'),
- IMAGETYPE_JPC => array('jpg', 'jpeg'),
- IMAGETYPE_JP2 => array('jpg', 'jpeg'),
- IMAGETYPE_JPX => array('jpg', 'jpeg'),
- IMAGETYPE_JB2 => array('jpg', 'jpeg'),
- IMAGETYPE_SWC => array('swc'),
- IMAGETYPE_IFF => array('iff'),
- IMAGETYPE_WBMP => array('wbmp'),
- IMAGETYPE_XBM => array('xbm'),
- );
- }
}
diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php
index c7ff2e78e0..87cd00197f 100644
--- a/tests/upload/filespec_test.php
+++ b/tests/upload/filespec_test.php
@@ -205,8 +205,7 @@ class phpbb_filespec_test extends phpbb_test_case
*/
public function test_get_extension($filename, $expected)
{
- $filespec = $this->get_filespec();
- $this->assertEquals($expected, $filespec->get_extension($filename));
+ $this->assertEquals($expected, filespec::get_extension($filename));
}
public function is_image_variables()