mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 11:19:56 +09:00
Updated unit tests - added input XML queries directly in the tests folder, instead of including them from core (for opage and syndication modules, which were removed).
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9786 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3928e8ec37
commit
ad7dda9b75
19 changed files with 646 additions and 113 deletions
|
|
@ -128,7 +128,7 @@
|
|||
}
|
||||
|
||||
function test_opage_getOpageList(){
|
||||
$xml_file = _XE_PATH_ . "modules/opage/queries/getOpageList.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/opage.getOpageList.xml";
|
||||
$argsString = '$args->s_title = "yuhuu";
|
||||
$args->module = \'opage\';';
|
||||
$expected = 'SELECT *
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
}
|
||||
|
||||
function test_syndication_getGrantedModules(){
|
||||
$xml_file = _XE_PATH_ . "modules/syndication/queries/getGrantedModules.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/syndication.getGrantedModules.xml";
|
||||
$argsString = '$args->module_srl = 12;
|
||||
$args->name = array(\'access\',\'view\',\'list\');';
|
||||
$expected = 'select "module_srl"
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
* Query argument is a single value - not in (12)
|
||||
*/
|
||||
function test_module_getModules_Notin_Single_Value(){
|
||||
$xml_file = _XE_PATH_ . "modules/syndication/queries/getModules.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/syndication.getModules.xml";
|
||||
$argsString = '$args->except_module_srls = 12;';
|
||||
$expected = 'select "modules"."site_srl" as "site_srl"
|
||||
, "modules"."module_srl" as "module_srl"
|
||||
|
|
@ -239,7 +239,7 @@
|
|||
}
|
||||
|
||||
function test_module_getModules_Notin_Multiple_Value_String(){
|
||||
$xml_file = _XE_PATH_ . "modules/syndication/queries/getModules.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/syndication.getModules.xml";
|
||||
$argsString = '$args->except_module_srls = "12, 13, 14";';
|
||||
$expected = 'select "modules"."site_srl" as "site_srl"
|
||||
, "modules"."module_srl" as "module_srl"
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
}
|
||||
|
||||
function test_module_getModules_Notin_Multiple_Value_Array(){
|
||||
$xml_file = _XE_PATH_ . "modules/syndication/queries/getModules.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/syndication.getModules.xml";
|
||||
$argsString = '$args->except_module_srls = array(12, 13, 14);';
|
||||
$expected = 'select "modules"."site_srl" as "site_srl"
|
||||
, "modules"."module_srl" as "module_srl"
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
}
|
||||
|
||||
function test_module_getModules_In_Single_Value(){
|
||||
$xml_file = _XE_PATH_ . "modules/syndication/queries/getModules.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/syndication.getModules.xml";
|
||||
$argsString = '$args->module_srls = 12;';
|
||||
$expected = 'select "modules"."site_srl" as "site_srl"
|
||||
, "modules"."module_srl" as "module_srl"
|
||||
|
|
@ -299,7 +299,7 @@
|
|||
}
|
||||
|
||||
function test_module_getModules_In_Multiple_Value_String(){
|
||||
$xml_file = _XE_PATH_ . "modules/syndication/queries/getModules.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/syndication.getModules.xml";
|
||||
$argsString = '$args->module_srls = "12, 13, 14";';
|
||||
$expected = 'select "modules"."site_srl" as "site_srl"
|
||||
, "modules"."module_srl" as "module_srl"
|
||||
|
|
@ -319,7 +319,7 @@
|
|||
}
|
||||
|
||||
function test_module_getModules_In_Multiple_Value_Array(){
|
||||
$xml_file = _XE_PATH_ . "modules/syndication/queries/getModules.xml";
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/cubrid/data/syndication.getModules.xml";
|
||||
$argsString = '$args->module_srls = array(12, 13, 14);';
|
||||
$expected = 'select "modules"."site_srl" as "site_srl"
|
||||
, "modules"."module_srl" as "module_srl"
|
||||
|
|
@ -390,7 +390,7 @@
|
|||
$argsString = '';
|
||||
$expected = 'select "session_key"
|
||||
from "xe_session" as "session"
|
||||
where "expired" <= ' . date("YmdHis");
|
||||
where "expired" <= \'' . date("YmdHis") . '\'';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue