aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-06-02 13:42:58 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-09-09 08:27:50 +0200
commitef59e0228a993bcaf7bf59c7cb24511f3cbe1b78 (patch)
treebfd8d38241257f85a9cd048fc7676b18cd052903 /tests/functional
parent0121e60cd73963043047e1b29b8d94ea9aa684e3 (diff)
downloadforums-ef59e0228a993bcaf7bf59c7cb24511f3cbe1b78.tar
forums-ef59e0228a993bcaf7bf59c7cb24511f3cbe1b78.tar.gz
forums-ef59e0228a993bcaf7bf59c7cb24511f3cbe1b78.tar.bz2
forums-ef59e0228a993bcaf7bf59c7cb24511f3cbe1b78.tar.xz
forums-ef59e0228a993bcaf7bf59c7cb24511f3cbe1b78.zip
[ticket/13904] Fix tests again
PHPBB3-13904
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/fileupload_remote_test.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php
index 34e9ca2b05..7301297096 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\language\language */
+ protected $language;
+
public function setUp()
{
parent::setUp();
@@ -30,7 +33,7 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
// Global $config required by unique_id
// Global $user required by fileupload::remote_upload
- global $config, $user;
+ global $config, $user, $phpbb_root_path, $phpEx;
if (!is_array($config))
{
@@ -48,6 +51,8 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case
$container->set('files.filespec', new \phpbb\files\filespec($this->filesystem));
$this->factory = new \phpbb\files\factory($container);
$container->set('files.factory', $this->factory);
+
+ $this->language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
}
public function tearDown()
@@ -60,7 +65,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);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language);
$upload->set_error_prefix('')
->set_allowed_extensions(array('jpg'))
->set_max_filesize(100);
@@ -71,7 +76,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);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language);
$upload->set_error_prefix('')
->set_allowed_extensions(array('jpg'))
->set_max_filesize(100);
@@ -82,7 +87,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);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language);
$upload->set_error_prefix('')
->set_allowed_extensions(array('gif'))
->set_max_filesize(1000);
@@ -94,7 +99,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);
+ $upload = new \phpbb\files\upload($this->filesystem, $this->factory, $this->language);
$upload->set_error_prefix('')
->set_allowed_extensions(array('gif'))
->set_max_filesize(100);