mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 19:29:56 +09:00
merge from branch luminous (version 1.5.4.2, ~r12561)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@12611 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2263200ce4
commit
cc47d2b247
196 changed files with 3655 additions and 2033 deletions
|
|
@ -36,6 +36,7 @@
|
|||
require_once(_XE_PATH_.'classes/db/queryparts/expression/InsertExpression.class.php');
|
||||
require_once(_XE_PATH_.'classes/db/queryparts/expression/UpdateExpression.class.php');
|
||||
require_once(_XE_PATH_.'classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php');
|
||||
require_once(_XE_PATH_.'classes/db/queryparts/expression/ClickCountExpression.class.php');
|
||||
require_once(_XE_PATH_.'classes/db/queryparts/table/Table.class.php');
|
||||
require_once(_XE_PATH_.'classes/db/queryparts/table/JoinTable.class.php');
|
||||
require_once(_XE_PATH_.'classes/db/queryparts/table/CubridTableWithHint.class.php');
|
||||
|
|
|
|||
|
|
@ -20,8 +20,12 @@ class DBTest extends PHPUnit_Framework_TestCase {
|
|||
$querySql = $db->{$methodName}($output);
|
||||
|
||||
// Remove whitespaces, tabs and all
|
||||
$querySql = Helper::cleanString($querySql);
|
||||
$expected = Helper::cleanString($expected);
|
||||
if(is_a($querySql, 'Object'))
|
||||
{
|
||||
$querySql = $querySql->getMessage();
|
||||
}
|
||||
$querySql = Helper::cleanString($querySql);
|
||||
$expected = Helper::cleanString($expected);
|
||||
}
|
||||
$this->assertEquals($expected, $querySql);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -439,6 +439,17 @@
|
|||
$argsString = '$args->package_srl = 18325662;';
|
||||
$expectedArgs = array(18325662);
|
||||
$this->_testPreparedQuery($xml_file, $argsString, $expected, 'getSelectSql', $expectedArgs);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue 1431 - xml click count error
|
||||
*/
|
||||
function testClickCount()
|
||||
{
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/click_count.xml";
|
||||
$argsString = '$args->incr_expose_count = true;';
|
||||
$expected = 'select INCR("expose_count") from "xe_modules" as "modules"';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<query id="getNewestDocuments" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="expose_count" click_count="incr_expose_count"/>
|
||||
</columns>
|
||||
</query>
|
||||
|
|
@ -380,4 +380,37 @@ class MysqlSelectTest extends MysqlTest {
|
|||
limit 5";
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add support for CAST / CONVERT function
|
||||
*/
|
||||
function testCast()
|
||||
{
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/cast.xml";
|
||||
$argsString = '';
|
||||
$expected = "select cast(`document_srl` as unsigned integer) from `xe_documents` as `documents`";
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add support for CAST / CONVERT function
|
||||
*/
|
||||
function testConvert()
|
||||
{
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/convert.xml";
|
||||
$argsString = '';
|
||||
$expected = "select convert(`document_srl`, unsigned integer) from `xe_documents` as `documents`";
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue 1431 - xml click count error
|
||||
*/
|
||||
function testClickCount()
|
||||
{
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/click_count.xml";
|
||||
$argsString = '$args->incr_expose_count = true;';
|
||||
$expected = "select `expose_count` from `xe_modules` as `modules`";
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
8
tests/classes/db/db/xml_query/mysql/data/cast.xml
Normal file
8
tests/classes/db/db/xml_query/mysql/data/cast.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="getDocumentListWithinComment" action="select">
|
||||
<tables>
|
||||
<table name="documents" alias="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="CAST(document_srl as UNSIGNED INTEGER)" />
|
||||
</columns>
|
||||
</query>
|
||||
8
tests/classes/db/db/xml_query/mysql/data/click_count.xml
Normal file
8
tests/classes/db/db/xml_query/mysql/data/click_count.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="getNewestDocuments" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="expose_count" click_count="incr_expose_count"/>
|
||||
</columns>
|
||||
</query>
|
||||
8
tests/classes/db/db/xml_query/mysql/data/convert.xml
Normal file
8
tests/classes/db/db/xml_query/mysql/data/convert.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="getDocumentListWithinComment" action="select">
|
||||
<tables>
|
||||
<table name="documents" alias="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="CONVERT(document_srl, UNSIGNED INTEGER)" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
@ -4,6 +4,7 @@ if(!defined('__XE__')) require dirname(__FILE__).'/../../Bootstrap.php';
|
|||
|
||||
require_once _XE_PATH_.'classes/handler/Handler.class.php';
|
||||
require_once _XE_PATH_.'classes/frontendfile/FrontEndFileHandler.class.php';
|
||||
require_once _XE_PATH_.'classes/file/FileHandler.class.php';
|
||||
|
||||
|
||||
class FrontEndFileHandlerTest extends PHPUnit_Framework_TestCase
|
||||
|
|
@ -16,12 +17,12 @@ class FrontEndFileHandlerTest extends PHPUnit_Framework_TestCase
|
|||
$handler = new FrontEndFileHandler();
|
||||
|
||||
// js(head)
|
||||
$handler->loadFile(array('./common/js/jquery.js'));
|
||||
$handler->loadFile(array('./common/js/jquery.min.js'));
|
||||
$handler->loadFile(array('./common/js/js_app.js'));
|
||||
$handler->loadFile(array('./common/js/common.js'));
|
||||
$handler->loadFile(array('./common/js/xml_handler.js'));
|
||||
$handler->loadFile(array('./common/js/xml_js_filter.js'));
|
||||
|
||||
|
||||
$expected[] = array('file' => '/xe/common/js/jquery.js', 'targetie' => '');
|
||||
$expected[] = array('file' => '/xe/common/js/js_app.js', 'targetie' => '');
|
||||
$expected[] = array('file' => '/xe/common/js/common.js', 'targetie' => '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue