mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 02:39:56 +09:00
Fixed a few MSSQL bugs - related to array query arguments and increment columns.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8632 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6edd5f03a7
commit
b3c75ac4db
15 changed files with 411 additions and 276 deletions
|
|
@ -6,10 +6,10 @@
|
|||
function _test($xml_file, $argsString, $expected){
|
||||
$this->_testQuery($xml_file, $argsString, $expected, 'getUpdateSql');
|
||||
}
|
||||
|
||||
function test_module_updateModule(){
|
||||
|
||||
function test_module_updateModule(){
|
||||
$xml_file = _XE_PATH_ . "modules/module/queries/updateModule.xml";
|
||||
$argsString = ' $args->module_category_srl = 0;
|
||||
$argsString = ' $args->module_category_srl = 0;
|
||||
$args->browser_title = "test";
|
||||
$args->layout_srl = 0;
|
||||
$args->mlayout_srl = 0;
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
$args->use_mobile = "";
|
||||
$args->site_srl = 0;
|
||||
$args->module_srl = 47374;';
|
||||
$expected = 'UPDATE "xe_modules"
|
||||
$expected = 'UPDATE "xe_modules"
|
||||
SET "module" = \'page\'
|
||||
, "mid" = \'test\'
|
||||
, "browser_title" = \'test\'
|
||||
|
|
@ -27,47 +27,47 @@
|
|||
, "open_rss" = \'Y\'
|
||||
, "header_text" = \'\'
|
||||
, "footer_text" = \'\'
|
||||
, "use_mobile" = \'n\'
|
||||
WHERE "site_srl" = 0
|
||||
, "use_mobile" = \'n\'
|
||||
WHERE "site_srl" = 0
|
||||
AND "module_srl" = 47374';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
function test_module_updateMember(){
|
||||
function test_member_updateLastLogin(){
|
||||
$xml_file = _XE_PATH_ . "modules/member/queries/updateLastLogin.xml";
|
||||
$argsString = ' $args->member_srl = 4;
|
||||
$argsString = ' $args->member_srl = 4;
|
||||
$args->last_login = "20110607120549";';
|
||||
$expected = 'UPDATE "xe_member" SET "member_srl" = 4, "last_login" = \'20110607120549\' WHERE "member_srl" = 4';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function test_module_updatePoint(){
|
||||
|
||||
function test_module_updatePoint(){
|
||||
$xml_file = _XE_PATH_ . "modules/point/queries/updatePoint.xml";
|
||||
$argsString = ' $args->member_srl = 4;
|
||||
$argsString = ' $args->member_srl = 4;
|
||||
$args->point = 105;';
|
||||
$expected = 'UPDATE "xe_point" SET "point" = 105 WHERE "member_srl" = 4';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function test_module_updateCounterUnique(){
|
||||
|
||||
function test_module_updateCounterUnique(){
|
||||
$xml_file = _XE_PATH_ . "modules/counter/queries/updateCounterUnique.xml";
|
||||
$argsString = '$args->regdate = 20110607;
|
||||
';
|
||||
$expected = 'UPDATE "xe_counter_status" SET "unique_visitor" = unique_visitor+1,
|
||||
"pageview" = pageview+1 WHERE "regdate" = 20110607 ';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
$expected = 'UPDATE "xe_counter_status" SET "unique_visitor" = "unique_visitor" + 1,
|
||||
"pageview" = "pageview" + 1 WHERE "regdate" = 20110607 ';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function test_module_updateMenu(){
|
||||
|
||||
function test_module_updateMenu(){
|
||||
$xml_file = _XE_PATH_ . "modules/menu/queries/updateMenu.xml";
|
||||
$argsString = '$args->menu_srl = 204;
|
||||
$args->title = "test_menu";
|
||||
';
|
||||
$expected = 'UPDATE "xe_menu" SET "title" = \'test_menu\' WHERE "menu_srl" = 204';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
// $queryTester->test_admin_deleteActionForward();
|
||||
// $queryTester->test_module_insertModule();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue