From 1dc14c0f3816c61992415024e8581bca56d1599b Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 12 Jun 2016 14:09:00 +0200 Subject: [ticket/14670] Remove usage of prototype scope in tests In this specific case, the mock container builder is used which does not even support setting the scope. PHPBB3-14670 --- tests/upload/fileupload_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/upload/fileupload_test.php') diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php index 5b3357237d..76b899cca7 100644 --- a/tests/upload/fileupload_test.php +++ b/tests/upload/fileupload_test.php @@ -83,13 +83,13 @@ class phpbb_fileupload_test extends phpbb_test_case $this->php_ini, $plupload, $this->request - ), phpbb_mock_container_builder::SCOPE_PROTOTYPE); + )); $this->container->set('files.types.local', new \phpbb\files\types\local( $this->factory, $this->language, $this->php_ini, $this->request - ), phpbb_mock_container_builder::SCOPE_PROTOTYPE); + )); $this->path = __DIR__ . '/fixture/'; $this->phpbb_root_path = $phpbb_root_path; -- cgit v1.2.1 From 42b7782927713c2ca2fb704db6217016347b586e Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 19 Mar 2017 21:46:20 +0700 Subject: [ticket/14972] Migrate from deprecated getMock() method to createMock() PHPBB3-14972 --- tests/upload/fileupload_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/upload/fileupload_test.php') diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php index 76b899cca7..84fc00bf98 100644 --- a/tests/upload/fileupload_test.php +++ b/tests/upload/fileupload_test.php @@ -50,7 +50,7 @@ class phpbb_fileupload_test extends phpbb_test_case $config['rand_seed'] = ''; $config['rand_seed_last_update'] = time() + 600; - $this->request = $this->getMock('\phpbb\request\request'); + $this->request = $this->createMock('\phpbb\request\request'); $this->php_ini = new \bantu\IniGetWrapper\IniGetWrapper; $this->filesystem = new \phpbb\filesystem\filesystem(); -- cgit v1.2.1 From ebac54aa9e705e99a562d2fe2c0f57bc6af8dd32 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 30 Dec 2018 11:36:08 +0100 Subject: [ticket/14948] Adjust calls for twig and phpunit updates PHPBB3-14948 --- tests/upload/fileupload_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/upload/fileupload_test.php') diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php index 84fc00bf98..ca9259d357 100644 --- a/tests/upload/fileupload_test.php +++ b/tests/upload/fileupload_test.php @@ -37,7 +37,7 @@ class phpbb_fileupload_test extends phpbb_test_case /** @var string phpBB root path */ protected $phpbb_root_path; - protected function setUp() + protected function setUp(): void { // Global $config required by unique_id global $config, $phpbb_root_path, $phpEx; @@ -107,7 +107,7 @@ class phpbb_fileupload_test extends phpbb_test_case return $filespec; } - protected function tearDown() + protected function tearDown(): void { // Clear globals global $config, $user; -- cgit v1.2.1