mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 17:59:55 +09:00
Added unit tests for correlated subqueries - select, from, where.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8556 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5d1eb1c21e
commit
1353ade0c2
41 changed files with 661 additions and 256 deletions
|
|
@ -1,26 +1,10 @@
|
|||
<?php
|
||||
require(_XE_PATH_ . 'test-phpUnit/config.inc.php');
|
||||
require(_XE_PATH_ . 'test-phpUnit/db/xml_query/cubrid/config.cubrid.inc.php');
|
||||
require(_XE_PATH_ . 'test-phpUnit/config/config.inc.php');
|
||||
|
||||
class CubridUpdateTest extends PHPUnit_Framework_TestCase {
|
||||
class CubridUpdateTest extends CubridTest {
|
||||
|
||||
function _test($xml_file, $argsString, $expected){
|
||||
$tester = new QueryTester();
|
||||
$outputString = $tester->getNewParserOutputString($xml_file, '"', $argsString);
|
||||
$output = eval($outputString);
|
||||
if(!is_a($output, 'Query')){
|
||||
if(!$output->toBool()) $querySql = "Date incorecte! Query-ul nu a putut fi executat.";
|
||||
}else {
|
||||
$db = &DB::getInstance();
|
||||
$querySql = $db->getUpdateSql($output);
|
||||
|
||||
// Remove whitespaces, tabs and all
|
||||
$querySql = Helper::cleanQuery($querySql);
|
||||
$expected = Helper::cleanQuery($expected);
|
||||
}
|
||||
|
||||
// Test
|
||||
$this->assertEquals($expected, $querySql);
|
||||
function _test($xml_file, $argsString, $expected){
|
||||
$this->_testQuery($xml_file, $argsString, $expected, 'getUpdateSql');
|
||||
}
|
||||
|
||||
function test_module_updateModule(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue