mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 19:29:56 +09:00
Added classes for testing db queries directly on a test database. Fixed a few insert bugs.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8600 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
54ef159878
commit
9606e263e8
9 changed files with 173 additions and 21 deletions
38
test-phpUnit/db/CubridOnlineTest.php
Normal file
38
test-phpUnit/db/CubridOnlineTest.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Base class for tests for CUBRID SQL syntax
|
||||
*/
|
||||
|
||||
class CubridOnlineTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
protected $backupGlobals = FALSE;
|
||||
protected $backupStaticAttributes = FALSE;
|
||||
protected $preserveGlobalState = FALSE;
|
||||
|
||||
/**
|
||||
* Prepare runtime context - tell DB class that current DB is CUBRID
|
||||
*/
|
||||
protected function setUp() {
|
||||
$oContext = &Context::getInstance();
|
||||
|
||||
$db_info->db_type = 'cubrid';
|
||||
$db_info->db_port = '33000';
|
||||
$db_info->db_hostname = '10.0.0.206';
|
||||
$db_info->db_userid = 'dba';
|
||||
$db_info->db_password = 'arniarules';
|
||||
$db_info->db_database = 'xe15QA';
|
||||
$db_info->db_table_prefix = 'xe';
|
||||
|
||||
$oContext->setDbInfo($db_info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Free resources - reset static DB and QueryParser
|
||||
*/
|
||||
protected function tearDown() {
|
||||
unset($GLOBALS['__DB__']);
|
||||
XmlQueryParser::setDBParser(null);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue