aboutsummaryrefslogtreecommitdiffstats
path: root/tests/migrator
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2019-12-29 02:12:36 +0700
committerrxu <rxu@mail.ru>2019-12-29 12:59:24 +0700
commitdcab0762210a4059cca7458344dcc1aeb0360c42 (patch)
treefbae8ee0429f1c6ebb29cd8af8c5f3d1d7450ea4 /tests/migrator
parent82e61f501abfa2768d7faac1ccd8d688c84e5e13 (diff)
downloadforums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar.gz
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar.bz2
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.tar.xz
forums-dcab0762210a4059cca7458344dcc1aeb0360c42.zip
[ticket/16276] Further fix PHP nightly tests
PHPBB3-16276
Diffstat (limited to 'tests/migrator')
-rw-r--r--tests/migrator/get_callable_from_step_test.php3
-rw-r--r--tests/migrator/schema_generator_test.php4
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/migrator/get_callable_from_step_test.php b/tests/migrator/get_callable_from_step_test.php
index f08caf3181..b0abb6199c 100644
--- a/tests/migrator/get_callable_from_step_test.php
+++ b/tests/migrator/get_callable_from_step_test.php
@@ -15,7 +15,7 @@ class get_callable_from_step_test extends phpbb_database_test_case
{
public function setUp(): void
{
- global $phpbb_root_path, $php_ext, $table_prefix, $phpbb_log;
+ global $phpbb_root_path, $php_ext, $table_prefix, $phpbb_log, $user;
parent::setUp();
@@ -24,6 +24,7 @@ class get_callable_from_step_test extends phpbb_database_test_case
$factory = new \phpbb\db\tools\factory();
$cache_service = $this->getMockBuilder('\phpbb\cache\service')->disableOriginalConstructor()->getMock();
$user = $this->getMockBuilder('\phpbb\user')->disableOriginalConstructor()->getMock();
+ $user->ip = '127.0.0.1';
$module_manager = new \phpbb\module\module_manager(
$this->getMockBuilder('\phpbb\cache\driver\dummy')->disableOriginalConstructor()->getMock(),
$db,
diff --git a/tests/migrator/schema_generator_test.php b/tests/migrator/schema_generator_test.php
index 88257430a7..1349b98953 100644
--- a/tests/migrator/schema_generator_test.php
+++ b/tests/migrator/schema_generator_test.php
@@ -26,6 +26,8 @@ class schema_generator_test extends phpbb_test_case
public function setUp(): void
{
+ global $phpbb_root_path, $phpEx;
+
parent::setUp();
$this->config = new \phpbb\config\config(array());
@@ -33,6 +35,8 @@ class schema_generator_test extends phpbb_test_case
$factory = new \phpbb\db\tools\factory();
$this->db_tools = $factory->get($this->db);
$this->table_prefix = 'phpbb_';
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $phpEx;
}
protected function get_schema_generator(array $class_names)