From 2c221ea67d0512961beea8fbcb30b23865c16bb0 Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 20 Dec 2006 03:15:04 +0000 Subject: Add quickstart docs for Active Record and SqlMap --- tests/simple_unit/SqlMap/common.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/simple_unit/SqlMap/common.php') diff --git a/tests/simple_unit/SqlMap/common.php b/tests/simple_unit/SqlMap/common.php index 57685c31..aed11671 100644 --- a/tests/simple_unit/SqlMap/common.php +++ b/tests/simple_unit/SqlMap/common.php @@ -41,7 +41,7 @@ class DefaultScriptRunner { $line = trim($line); if(strlen($line) > 0) - $connection->execute($line); + $connection->createCommand($line)->execute(); } } } @@ -84,15 +84,16 @@ class SQLiteBaseTestConfig extends BaseTestConfig return new CopyFileScriptRunner($this->baseFile, $this->targetFile); } } -/* + class MySQLBaseTestConfig extends BaseTestConfig { public function __construct() { - $this->_sqlmap = SQLMAP_TESTS.'/mysql.xml'; - $this->_connectionString = 'mysql://root:weizhuo01@localhost/IBatisNet'; + $this->_sqlmapConfigFile = SQLMAP_TESTS.'/mysql.xml'; $this->_scriptDir = SQLMAP_TESTS.'/scripts/mysql/'; $this->_features = array('insert_id'); + $dsn = 'mysql:host=localhost;dbname=sqlmap_test'; + $this->_connection = new TDbConnection($dsn, 'test', 'test111'); } } @@ -106,7 +107,6 @@ class MSSQLBaseTestConfig extends BaseTestConfig $this->_features = array('insert_id'); } } -*/ class BaseTestConfig { @@ -143,9 +143,9 @@ class BaseTestConfig { //change this to connection to a different database - //return new MySQLBaseTestConfig(); + return new MySQLBaseTestConfig(); - return new SQLiteBaseTestConfig(); + //return new SQLiteBaseTestConfig(); //return new MSSQLBaseTestConfig(); } -- cgit v1.2.3