aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-07-24 09:20:50 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-10-17 23:05:57 +0200
commit8f5a0ad6f73e7b7757b02c827436384c96069b5a (patch)
tree87a16ddaa2f645d62728f0b4543199e43995bfeb /tests
parentf1047ac854baba4d1015cd9a555a523b3860f2c9 (diff)
downloadforums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.gz
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.bz2
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.tar.xz
forums-8f5a0ad6f73e7b7757b02c827436384c96069b5a.zip
[ticket/14039] Revamp updater
PHPBB3-14039
Diffstat (limited to 'tests')
-rw-r--r--tests/di/fixtures/other_config/production/config.yml2
-rw-r--r--tests/di/fixtures/other_config/production/container/environment.yml29
-rw-r--r--tests/event/exception_listener_test.php4
-rw-r--r--tests/installer/installer_config_test.php19
4 files changed, 44 insertions, 10 deletions
diff --git a/tests/di/fixtures/other_config/production/config.yml b/tests/di/fixtures/other_config/production/config.yml
new file mode 100644
index 0000000000..fcfa84f68b
--- /dev/null
+++ b/tests/di/fixtures/other_config/production/config.yml
@@ -0,0 +1,2 @@
+core:
+ require_dev_dependencies: true
diff --git a/tests/di/fixtures/other_config/production/container/environment.yml b/tests/di/fixtures/other_config/production/container/environment.yml
new file mode 100644
index 0000000000..4960562a6c
--- /dev/null
+++ b/tests/di/fixtures/other_config/production/container/environment.yml
@@ -0,0 +1,29 @@
+parameters:
+ other_config: true
+
+services:
+ config.php:
+ synthetic: true
+
+ dbal.conn:
+ class: phpbb\db\driver\factory
+ arguments:
+ - @service_container
+
+ dispatcher:
+ class: phpbb\db\driver\container_mock
+
+ ext.manager:
+ class: phpbb\extension\manager_mock
+
+ template.twig.environment:
+ class: Exception
+ arguments:
+ - ~
+ - ~
+ - ~
+ - ~
+ - ~
+ - ~
+ - ~
+ - []
diff --git a/tests/event/exception_listener_test.php b/tests/event/exception_listener_test.php
index 608cde4f9b..e643fadf2c 100644
--- a/tests/event/exception_listener_test.php
+++ b/tests/event/exception_listener_test.php
@@ -83,10 +83,8 @@ class exception_listener extends phpbb_test_case
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
$lang = new \phpbb\language\language($lang_loader);
- $user = new \phpbb\user($lang, '\phpbb\datetime');
- $user->add_lang('common');
- $exception_listener = new \phpbb\event\kernel_exception_subscriber($template, $user);
+ $exception_listener = new \phpbb\event\kernel_exception_subscriber($template, $lang);
$event = new \Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent($this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'), $request, \Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST, $exception);
$exception_listener->on_kernel_exception($event);
diff --git a/tests/installer/installer_config_test.php b/tests/installer/installer_config_test.php
index 7de23aea36..c8e482e260 100644
--- a/tests/installer/installer_config_test.php
+++ b/tests/installer/installer_config_test.php
@@ -62,13 +62,18 @@ class phpbb_installer_config_test extends phpbb_test_case
$this->config->increment_current_task_progress(2);
- $this->assertEquals(array(
- 'last_task_module_name' => 'bar',
- 'last_task_name' => 'foo',
- 'max_task_progress' => 10,
- 'current_task_progress' => 3,
- ),
- $this->config->get_progress_data()
+ // We only want to check these values
+ $result = $this->config->get_progress_data();
+ $expected_result = array(
+ 'last_task_module_name' => 'bar',
+ 'last_task_name' => 'foo',
+ 'max_task_progress' => 10,
+ 'current_task_progress' => 3,
);
+
+ foreach ($expected_result as $key => $value)
+ {
+ $this->assertEquals($value, $result[$key]);
+ }
}
}