From 106be2b3f8d52d1f4bc5a0dc6d2e6c11673d41a5 Mon Sep 17 00:00:00 2001 From: ucorina Date: Wed, 12 Oct 2011 18:16:55 +0000 Subject: [PATCH] Added unit test for XML query with IN and array default value. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9619 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- test-phpUnit/config/config.inc.php | 2 +- test-phpUnit/db/xml_query/mysql/MysqlSelectTest.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/test-phpUnit/config/config.inc.php b/test-phpUnit/config/config.inc.php index 425c6f9a5..6ee61f7cf 100644 --- a/test-phpUnit/config/config.inc.php +++ b/test-phpUnit/config/config.inc.php @@ -22,7 +22,7 @@ // require_once(_XE_PATH_.'classes/context/Context.class.php'); // require_once(_XE_PATH_.'classes/file/FileHandler.class.php'); // require_once(_XE_PATH_.'classes/xml/XmlParser.class.php'); - require_once(_XE_PATH_.'classes/xml/XmlQueryParser.class.php'); + require_once(_XE_PATH_.'classes/xml/XmlQueryParser.150.class.php'); // require_once(_XE_PATH_.'classes/db/DB.class.php'); diff --git a/test-phpUnit/db/xml_query/mysql/MysqlSelectTest.php b/test-phpUnit/db/xml_query/mysql/MysqlSelectTest.php index 0f06d8f4d..ff7be5285 100644 --- a/test-phpUnit/db/xml_query/mysql/MysqlSelectTest.php +++ b/test-phpUnit/db/xml_query/mysql/MysqlSelectTest.php @@ -133,4 +133,14 @@ limit 0, 20'; $this->_test($xml_file, $argsString, $expected); } + + function test_Syndication_getGrantedModules(){ + $xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/syndication.getGrantedModules.xml"; + $argsString = ''; + $expected = 'select `module_srl` + from `xe_module_grants` as `module_grants` + where `name` in (\'access\',\'view\',\'list\') + and (`group_srl` >= 1 or `group_srl` = -1 or `group_srl` = -2) group by `module_srl`'; + $this->_test($xml_file, $argsString, $expected); + } } \ No newline at end of file