aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-12-25 19:20:02 +0100
committerMarc Alexander <admin@m-a-styles.de>2018-01-01 18:55:19 +0100
commit27a24d0a677a3f1fb0dcf2393859eb37fe3bc0c3 (patch)
tree51acc01b436ba4e62db6c6faf0ee375649fa0695 /tests
parent400fc0f73d03010d3bf28d2b1db5d789dc085334 (diff)
downloadforums-27a24d0a677a3f1fb0dcf2393859eb37fe3bc0c3.tar
forums-27a24d0a677a3f1fb0dcf2393859eb37fe3bc0c3.tar.gz
forums-27a24d0a677a3f1fb0dcf2393859eb37fe3bc0c3.tar.bz2
forums-27a24d0a677a3f1fb0dcf2393859eb37fe3bc0c3.tar.xz
forums-27a24d0a677a3f1fb0dcf2393859eb37fe3bc0c3.zip
[ticket/15055] Try using build matrix
PHPBB3-15055
Diffstat (limited to 'tests')
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php8
-rw-r--r--tests/tree/nestedset_forum_base.php10
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index 147029d699..74170f2f35 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -222,6 +222,14 @@ class phpbb_database_test_connection_manager
$this->purge_extras();
break;
+ case 'phpbb\db\driver\mssql':
+ case 'phpbb\db\driver\mssqlnative':
+ $this->connect();
+ // Drop all tables
+ $this->pdo->exec("EXEC sp_MSforeachtable 'DROP TABLE ?'");
+ $this->purge_extras();
+ break;
+
default:
$this->connect(false);
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);
+ }
}
}