aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-12-13 19:07:49 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2012-12-13 19:15:24 -0500
commit9e3fd3bf8e8ff08b159d9151aef6f9bb6b9244ee (patch)
treeac564d54f2d397abe53ae46f22906677ddeda1a5 /tests
parent1a1ae1b663079792c775c4a51d5aaaf0259fb05c (diff)
downloadforums-9e3fd3bf8e8ff08b159d9151aef6f9bb6b9244ee.tar
forums-9e3fd3bf8e8ff08b159d9151aef6f9bb6b9244ee.tar.gz
forums-9e3fd3bf8e8ff08b159d9151aef6f9bb6b9244ee.tar.bz2
forums-9e3fd3bf8e8ff08b159d9151aef6f9bb6b9244ee.tar.xz
forums-9e3fd3bf8e8ff08b159d9151aef6f9bb6b9244ee.zip
[ticket/11015] Fix 3.0 to 3.1 dbms conversion for mysqli.
PHPBB3-11015
Diffstat (limited to 'tests')
-rw-r--r--tests/functions/convert_30_dbms_to_31_test.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/functions/convert_30_dbms_to_31_test.php b/tests/functions/convert_30_dbms_to_31_test.php
new file mode 100644
index 0000000000..d08bf87f15
--- /dev/null
+++ b/tests/functions/convert_30_dbms_to_31_test.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
+
+class phpbb_convert_30_dbms_to_31_test extends phpbb_test_case
+{
+ public function convert_30_dbms_to_31_data()
+ {
+ return array(
+ array('firebird'),
+ array('mssql'),
+ array('mssql_odbc'),
+ array('mssqlnative'),
+ array('mysql'),
+ array('mysqli'),
+ array('oracle'),
+ array('postgres'),
+ array('sqlite'),
+ );
+ }
+
+ /**
+ * @dataProvider convert_30_dbms_to_31_data
+ */
+ public function test_convert_30_dbms_to_31($input)
+ {
+ $expected = "phpbb_db_driver_$input";
+
+ $output = phpbb_convert_30_dbms_to_31($input);
+
+ $this->assertEquals($expected, $output);
+ }
+}