Issue 343 - Problem when condition have var and default attribute both.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9482 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-10-04 14:50:26 +00:00
parent 3815aece09
commit 36211cb65b
5 changed files with 120 additions and 28 deletions

View file

@ -30,7 +30,7 @@
function test_module_getDefaultModules(){
$xml_file = _XE_PATH_ . "modules/module/queries/getDefaultModules.xml";
$argsString = '';
$argsString = '$args->site_srl = 0;';
$expected = 'SELECT [modules].[site_srl]
, [modules].[module]
, [modules].[mid]
@ -127,15 +127,19 @@
$this->_test($xml_file, $argsString, $expected, array("'10'"));
}
/**
* Query fails because XML is wrong - title column does not exist
* in xe_modules. Maybe the developer ment "browser_title"
*/
function test_opage_getOpageList(){
$xml_file = _XE_PATH_ . "modules/opage/queries/getOpageList.xml";
$argsString = '$args->s_title = "yuhuu";
$args->module = \'opage\';';
$args->module = \'opage\';';
$expected = 'SELECT TOP 20 *
FROM [xe_modules] as [modules]
WHERE [module] = ? and ([title] like ?)
WHERE [module] = \'opage\' and ([title] like ?)
ORDER BY [module_srl] desc';
$this->_test($xml_file, $argsString, $expected, array("'opage'", "'%yuhuu%'"));
$this->_test($xml_file, $argsString, $expected, array("'%yuhuu%'"));
}
function test_module_getExtraVars(){