From 21f3aee7f4a9fd579c5cbd8f4b9797877d8e7623 Mon Sep 17 00:00:00 2001 From: ucorina Date: Thu, 3 Nov 2011 18:19:07 +0000 Subject: [PATCH] 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 --- .../db/db/xml_query/mysql/MysqlSelectTest.php | 17 +++++++++++++++ ...ets.newest_document.getNewestDocuments.xml | 21 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tests/classes/db/db/xml_query/mysql/data/widgets.newest_document.getNewestDocuments.xml diff --git a/tests/classes/db/db/xml_query/mysql/MysqlSelectTest.php b/tests/classes/db/db/xml_query/mysql/MysqlSelectTest.php index b058f791a..cd330b846 100644 --- a/tests/classes/db/db/xml_query/mysql/MysqlSelectTest.php +++ b/tests/classes/db/db/xml_query/mysql/MysqlSelectTest.php @@ -190,4 +190,21 @@ limit 0, 20'; $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); + } } \ No newline at end of file diff --git a/tests/classes/db/db/xml_query/mysql/data/widgets.newest_document.getNewestDocuments.xml b/tests/classes/db/db/xml_query/mysql/data/widgets.newest_document.getNewestDocuments.xml new file mode 100644 index 000000000..b83244911 --- /dev/null +++ b/tests/classes/db/db/xml_query/mysql/data/widgets.newest_document.getNewestDocuments.xml @@ -0,0 +1,21 @@ + + + +
+ + + + + + + + + + + + + + + + +