mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/13904] Fix filespec tests
PHPBB3-13904
This commit is contained in:
parent
57de896286
commit
2915647a54
2 changed files with 4 additions and 3 deletions
|
@ -426,7 +426,7 @@ class filespec
|
||||||
$this->height = $this->image_info['height'];
|
$this->height = $this->image_info['height'];
|
||||||
|
|
||||||
// Check image type
|
// Check image type
|
||||||
$types = \fileupload::image_types();
|
$types = upload::image_types();
|
||||||
|
|
||||||
if (!isset($types[$this->image_info['type']]) || !in_array($this->extension, $types[$this->image_info['type']]))
|
if (!isset($types[$this->image_info['type']]) || !in_array($this->extension, $types[$this->image_info['type']]))
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,8 @@ class phpbb_filespec_test extends phpbb_test_case
|
||||||
'error' => '',
|
'error' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
return new filespec(array_merge($upload_ary, $override), null, $this->filesystem, $this->mimetype_guesser);
|
$filespec = new \phpbb\files\filespec($this->filesystem, $this->mimetype_guesser);
|
||||||
|
return $filespec->set_upload_ary(array_merge($upload_ary, $override));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function tearDown()
|
protected function tearDown()
|
||||||
|
@ -226,7 +227,7 @@ class phpbb_filespec_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_get_extension($filename, $expected)
|
public function test_get_extension($filename, $expected)
|
||||||
{
|
{
|
||||||
$this->assertEquals($expected, filespec::get_extension($filename));
|
$this->assertEquals($expected, \phpbb\files\filespec::get_extension($filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function is_image_variables()
|
public function is_image_variables()
|
||||||
|
|
Loading…
Add table
Reference in a new issue