aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-08-26 13:57:42 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-09-09 08:28:10 +0200
commitcdde86ce7e0c594fad5992789b3fae466bd526cc (patch)
treed5c07abb9173ff98a5e2b05938144bfb10a44383 /tests/functional
parent02f94b7527298aad3bd15738676da872aa498039 (diff)
downloadforums-cdde86ce7e0c594fad5992789b3fae466bd526cc.tar
forums-cdde86ce7e0c594fad5992789b3fae466bd526cc.tar.gz
forums-cdde86ce7e0c594fad5992789b3fae466bd526cc.tar.bz2
forums-cdde86ce7e0c594fad5992789b3fae466bd526cc.tar.xz
forums-cdde86ce7e0c594fad5992789b3fae466bd526cc.zip
[ticket/13904] Use \phpbb\php\ini class for ini_get()
PHPBB3-13904
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/fileupload_remote_test.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php
index 1a74b3b498..45c1e914c2 100644
--- a/tests/functional/fileupload_remote_test.php
+++ b/tests/functional/fileupload_remote_test.php
@@ -22,6 +22,9 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
/** @var \phpbb\files\factory */
protected $factory;
+ /** @var \phpbb\php\ini */
+ protected $php_ini;
+
/** @var \phpbb\language\language */
protected $language;
@@ -51,9 +54,10 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
$this->filesystem = new \phpbb\filesystem\filesystem();
$this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
$this->request = $this->getMock('\phpbb\request\request');
+ $this->php_ini = new \phpbb\php\ini;
$container = new phpbb_mock_container_builder();
- $container->set('files.filespec', new \phpbb\files\filespec($this->filesystem, $this->language, $this->phpbb_root_path));
+ $container->set('files.filespec', new \phpbb\files\filespec($this->filesystem, $this->php_ini, $this->language, $this->phpbb_root_path));
$this->factory = new \phpbb\files\factory($container);
$container->set('files.factory', $this->factory);
$container->set('files.types.remote', new \phpbb\files\types\remote($this->factory, $this->language, $this->request, $phpbb_root_path));
@@ -70,7 +74,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
public function test_invalid_extension()
{
/** @var \phpbb\files\upload $upload */
- $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path);
$upload->set_error_prefix('')
->set_allowed_extensions(array('jpg'))
->set_max_filesize(100);
@@ -81,7 +85,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
public function test_empty_file()
{
/** @var \phpbb\files\upload $upload */
- $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path);
$upload->set_error_prefix('')
->set_allowed_extensions(array('jpg'))
->set_max_filesize(100);
@@ -92,7 +96,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
public function test_successful_upload()
{
/** @var \phpbb\files\upload $upload */
- $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path);
$upload->set_error_prefix('')
->set_allowed_extensions(array('gif'))
->set_max_filesize(1000);
@@ -105,7 +109,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
public function test_too_large()
{
/** @var \phpbb\files\upload $upload */
- $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language, $this->request, $this->phpbb_root_path);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->php_ini, $this->language, $this->request, $this->phpbb_root_path);
$upload->set_error_prefix('')
->set_allowed_extensions(array('gif'))
->set_max_filesize(100);