mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 09:09:59 +09:00
Added unit test for Issue 837
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9800 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9ffb1b39a0
commit
21f3aee7f4
2 changed files with 38 additions and 0 deletions
|
|
@ -190,4 +190,21 @@
|
||||||
limit 0, 20';
|
limit 0, 20';
|
||||||
$this->_test($xml_file, $argsString, $expected);
|
$this->_test($xml_file, $argsString, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function test_WidgetsNewestDocument_getNewestDocuments(){
|
||||||
|
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/widgets.newest_document.getNewestDocuments.xml";
|
||||||
|
$argsString = '$args->module_srl = "566036,3777868";';
|
||||||
|
$expected = 'select `modules`.`site_srl` as `site_srl`
|
||||||
|
, `modules`.`mid` as `mid`
|
||||||
|
, `documents`.*
|
||||||
|
from `xe_modules` as `modules`
|
||||||
|
, `xe_documents` as `documents`
|
||||||
|
where (
|
||||||
|
`documents`.`module_srl` in (566036,3777868)
|
||||||
|
and `modules`.`module_srl` = `documents`.`module_srl`)
|
||||||
|
and `documents`.`list_order` <= 2100000000
|
||||||
|
order by `documents`.`list_order` asc
|
||||||
|
limit 20';
|
||||||
|
$this->_test($xml_file, $argsString, $expected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<query id="getNewestDocuments" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="modules" />
|
||||||
|
<table name="documents" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="modules.site_srl" alias="site_srl"/>
|
||||||
|
<column name="modules.mid" alias="mid"/>
|
||||||
|
<column name="documents.*" />
|
||||||
|
</columns>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="equal" column="modules.site_srl" var="site_srl" />
|
||||||
|
<condition operation="notin" column="documents.module_srl" default="0" pipe="and" />
|
||||||
|
<condition operation="in" column="documents.module_srl" var="module_srl" filter="number" pipe="and" />
|
||||||
|
<condition operation="equal" column="modules.module_srl" default="documents.module_srl" filter="number" pipe="and" />
|
||||||
|
</conditions>
|
||||||
|
<navigation>
|
||||||
|
<index var="sort_index" default="documents.list_order" order="order_type" />
|
||||||
|
<list_count var="list_count" default="20" />
|
||||||
|
</navigation>
|
||||||
|
</query>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue