From 79d4ff553844fa80be4da9286239f62a45489072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gae=CC=88tan=20Muller?= Date: Sun, 11 Jan 2015 17:32:31 +0100 Subject: [ticket/13494] Update calls to `set_config()` PHPBB3-13494 --- tests/tree/nestedset_forum_base.php | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/tree/nestedset_forum_base.php') diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php index c56be1f81e..647fcef2af 100644 --- a/tests/tree/nestedset_forum_base.php +++ b/tests/tree/nestedset_forum_base.php @@ -59,7 +59,6 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case global $config; $config = $this->config = new \phpbb\config\config(array('nestedset_forum_lock' => 0)); - set_config(null, null, null, $this->config); $this->lock = new \phpbb\lock\db('nestedset_forum_lock', $this->config, $this->db); $this->set = new \phpbb\tree\nestedset_forum($this->db, $this->lock, 'phpbb_forums'); -- cgit v1.2.1 From 14e8113fcf01be7dbdb080458fcbf4e75668cc1a Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 31 Mar 2016 11:06:47 -0700 Subject: [ticket/14576] Move common required files to bootstrap PHPBB3-14576 --- tests/tree/nestedset_forum_base.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/tree/nestedset_forum_base.php') diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php index 647fcef2af..3daa75b2e4 100644 --- a/tests/tree/nestedset_forum_base.php +++ b/tests/tree/nestedset_forum_base.php @@ -11,8 +11,6 @@ * */ -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; - class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case { public function getDataSet() -- cgit v1.2.1 From 27a24d0a677a3f1fb0dcf2393859eb37fe3bc0c3 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 25 Dec 2017 19:20:02 +0100 Subject: [ticket/15055] Try using build matrix PHPBB3-15055 --- tests/tree/nestedset_forum_base.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/tree/nestedset_forum_base.php') diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php index 3daa75b2e4..62f3e0bcab 100644 --- a/tests/tree/nestedset_forum_base.php +++ b/tests/tree/nestedset_forum_base.php @@ -100,6 +100,11 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case } else { + if (strpos($this->db->sql_layer, 'mssql') !== false) + { + $sql = 'SET IDENTITY_INSERT phpbb_forums ON'; + $this->db->sql_query($sql); + } $buffer = new \phpbb\db\sql_insert_buffer($this->db, 'phpbb_forums'); $buffer->insert_all($forums); $buffer->flush(); @@ -107,6 +112,11 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case $this->database_synchronisation(array( 'phpbb_forums' => array('forum_id'), )); + if (strpos($this->db->sql_layer, 'mssql') !== false) + { + $sql = 'SET IDENTITY_INSERT phpbb_forums OFF'; + $this->db->sql_query($sql); + } } } -- cgit v1.2.1 From a999718b42742c9911a24a74cf60f80e196d5cf8 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 31 Dec 2017 11:53:15 +0100 Subject: [ticket/15055] Support console questions on windows PHPBB3-15055 --- tests/tree/nestedset_forum_base.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/tree/nestedset_forum_base.php') diff --git a/tests/tree/nestedset_forum_base.php b/tests/tree/nestedset_forum_base.php index 62f3e0bcab..498c6a69a2 100644 --- a/tests/tree/nestedset_forum_base.php +++ b/tests/tree/nestedset_forum_base.php @@ -69,7 +69,7 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case static $forums; if (empty($forums)) - { + { $this->create_forum('Parent with two flat children'); $this->create_forum('Flat child #1', 1); $this->create_forum('Flat child #2', 1); @@ -86,7 +86,7 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case // Updating forum_parents column here so it's not empty // This is required, so we can see whether the methods - // correctly clear the values. + // correctly clear the values. $sql = "UPDATE phpbb_forums SET forum_parents = 'a:0:{}'"; $this->db->sql_query($sql); @@ -100,6 +100,8 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case } else { + // Turn on identity insert on mssql to be able to insert into + // identity columns (e.g. forum_id) if (strpos($this->db->sql_layer, 'mssql') !== false) { $sql = 'SET IDENTITY_INSERT phpbb_forums ON'; @@ -112,12 +114,14 @@ class phpbb_tests_tree_nestedset_forum_base extends phpbb_database_test_case $this->database_synchronisation(array( 'phpbb_forums' => array('forum_id'), )); + + // Disable identity insert on mssql again if (strpos($this->db->sql_layer, 'mssql') !== false) { $sql = 'SET IDENTITY_INSERT phpbb_forums OFF'; $this->db->sql_query($sql); } - } + } } protected function create_forum($name, $parent_id = 0) -- cgit v1.2.1