aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tree
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-12-31 11:53:15 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-01-01 18:56:20 +0100
commita999718b42742c9911a24a74cf60f80e196d5cf8 (patch)
treef87c2792a77176d00d29f12c8787d7c3bf5ea55a /tests/tree
parentede339c1c8b19fa01a61594d231902013ef473b0 (diff)
downloadforums-a999718b42742c9911a24a74cf60f80e196d5cf8.tar
forums-a999718b42742c9911a24a74cf60f80e196d5cf8.tar.gz
forums-a999718b42742c9911a24a74cf60f80e196d5cf8.tar.bz2
forums-a999718b42742c9911a24a74cf60f80e196d5cf8.tar.xz
forums-a999718b42742c9911a24a74cf60f80e196d5cf8.zip
[ticket/15055] Support console questions on windows
PHPBB3-15055
Diffstat (limited to 'tests/tree')
-rw-r--r--tests/tree/nestedset_forum_base.php10
1 files changed, 7 insertions, 3 deletions
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)