diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-09-03 17:20:54 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-09-09 08:29:07 +0200 |
commit | 591995267a3f1931131fa630bd3ff120476f881f (patch) | |
tree | bedddcd0015ceec05fa8a32cab473b849bb01112 /phpBB/phpbb/files | |
parent | c3ccd423d2a6f3aab1183b22177df6f605f33371 (diff) | |
download | forums-591995267a3f1931131fa630bd3ff120476f881f.tar forums-591995267a3f1931131fa630bd3ff120476f881f.tar.gz forums-591995267a3f1931131fa630bd3ff120476f881f.tar.bz2 forums-591995267a3f1931131fa630bd3ff120476f881f.tar.xz forums-591995267a3f1931131fa630bd3ff120476f881f.zip |
[ticket/13904] Improve test coverage of filespec class
PHPBB3-13904
Diffstat (limited to 'phpBB/phpbb/files')
-rw-r--r-- | phpBB/phpbb/files/filespec.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/phpbb/files/filespec.php b/phpBB/phpbb/files/filespec.php index 580016b281..6ce54a4789 100644 --- a/phpBB/phpbb/files/filespec.php +++ b/phpBB/phpbb/files/filespec.php @@ -75,6 +75,9 @@ class filespec /** @var \bantu\IniGetWrapper\IniGetWrapper ini_get() wrapper class */ protected $php_ini; + /** @var \fastImageSize\fastImageSize */ + protected $imagesize; + /** @var language Language class */ protected $language; @@ -97,11 +100,12 @@ class filespec * @param \phpbb\mimetype\guesser $mimetype_guesser Mime type guesser * @param \phpbb\plupload\plupload $plupload Plupload */ - public function __construct(\phpbb\filesystem\filesystem_interface $phpbb_filesystem, language $language, \bantu\IniGetWrapper\IniGetWrapper $php_ini, $phpbb_root_path, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null) + public function __construct(\phpbb\filesystem\filesystem_interface $phpbb_filesystem, language $language, \bantu\IniGetWrapper\IniGetWrapper $php_ini, \fastImageSize\fastImageSize $imagesize, $phpbb_root_path, \phpbb\mimetype\guesser $mimetype_guesser = null, \phpbb\plupload\plupload $plupload = null) { $this->filesystem = $phpbb_filesystem; $this->language = $language; $this->php_ini = $php_ini; + $this->imagesize = $imagesize; $this->phpbb_root_path = $phpbb_root_path; $this->plupload = $plupload; $this->mimetype_guesser = $mimetype_guesser; @@ -500,10 +504,7 @@ class filespec { $this->width = $this->height = 0; - // Get imagesize class - $imagesize = new \fastImageSize\fastImageSize(); - - $this->image_info = $imagesize->getImageSize($this->destination_file, $this->mimetype); + $this->image_info = $this->imagesize->getImageSize($this->destination_file, $this->mimetype); if ($this->image_info !== false) { |