mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/10941] Unit tests for fileupload class added
PHPBB3-10941
This commit is contained in:
32
tests/mock/filespec.php
Normal file
32
tests/mock/filespec.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2012 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Mock filespec class with some basic values to help with testing the
|
||||
* fileupload class
|
||||
*/
|
||||
class phpbb_mock_filespec
|
||||
{
|
||||
public $filesize;
|
||||
public $realname;
|
||||
public $extension;
|
||||
public $width;
|
||||
public $height;
|
||||
public $error = array();
|
||||
|
||||
public function check_content($disallowed_content)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get($property)
|
||||
{
|
||||
return $this->$property;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user