From 5bc03c961023e01dfb74eff296b12b6169d705e4 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 15 Mar 2015 17:16:53 +0000 Subject: [PATCH] [feature/sql-bool-builder] Prepare testing class PHPBB3-13652 --- tests/dbal/boolean_processor_test.php | 24 +++++++ tests/dbal/fixtures/boolean_processor.xml | 84 +++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 tests/dbal/boolean_processor_test.php create mode 100644 tests/dbal/fixtures/boolean_processor.xml diff --git a/tests/dbal/boolean_processor_test.php b/tests/dbal/boolean_processor_test.php new file mode 100644 index 0000000000..f80e12ad4f --- /dev/null +++ b/tests/dbal/boolean_processor_test.php @@ -0,0 +1,24 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; + +class phpbb_boolean_processor_test extends phpbb_database_test_case +{ + public function getDataSet() + { + return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/boolean_processor.xml'); + } + +} diff --git a/tests/dbal/fixtures/boolean_processor.xml b/tests/dbal/fixtures/boolean_processor.xml new file mode 100644 index 0000000000..c5da677116 --- /dev/null +++ b/tests/dbal/fixtures/boolean_processor.xml @@ -0,0 +1,84 @@ + + + + ban_id + ban_userid + + 1 + 2 + +
+ + user_id + username + username_clean + user_permissions + user_sig + + 1 + mass email + mass email + + + + + 2 + banned + banned + + + + + 3 + helper + helper + + + + + 4 + GroupBPal + groupbpal + + + + + 5 + GroupBPal2 + groupBPal2 + + + + + 6 + not in group + not in group + + + +
+ + user_id + group_id + + 1 + 1 + + + 2 + 1 + + + 3 + 1 + + + 4 + 2 + + + 5 + 2 + +
+