diff options
author | godzilla80@gmx.net <> | 2010-02-21 11:34:12 +0000 |
---|---|---|
committer | godzilla80@gmx.net <> | 2010-02-21 11:34:12 +0000 |
commit | a779552bc0809d5673d7b4353168aef8114035b4 (patch) | |
tree | 4731d3c0867cbdba8a88facade20fda506226df9 /tests/unit/Data/SqlMap/DynamicParameterTest.php | |
parent | c3dbc4d210cfb9d96961a990aa74c55560f2b4b4 (diff) |
Merged latest changes into trunk (except r2773)
/branches/3.1:r2765,2770-2771,2774,2776-2778
Diffstat (limited to 'tests/unit/Data/SqlMap/DynamicParameterTest.php')
-rw-r--r-- | tests/unit/Data/SqlMap/DynamicParameterTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/unit/Data/SqlMap/DynamicParameterTest.php b/tests/unit/Data/SqlMap/DynamicParameterTest.php index ec37f4e0..f9b39b96 100644 --- a/tests/unit/Data/SqlMap/DynamicParameterTest.php +++ b/tests/unit/Data/SqlMap/DynamicParameterTest.php @@ -15,6 +15,9 @@ class DynamicParameterTest extends PHPUnit_Framework_TestCase static $conn;
static $sqlMapManager;
+ if(Prado::getApplication() === null)
+ Prado::setApplication(new TApplication(dirname(__FILE__).'/app'));
+
if($conn === null)
$conn = new TDbConnection('mysql:host=localhost;dbname=prado_system_data_sqlmap', 'prado_unitest', 'prado_system_data_sqlmap_unitest');
@@ -85,6 +88,22 @@ class DynamicParameterTest extends PHPUnit_Framework_TestCase self::assertEquals('staticsql1', $value);
}
+ /**
+ * Issue#209 test
+ */
+ public function testMysqlInlineEscapeParam()
+ {
+ $mapper = $this->getMysqlSqlMapManager();
+ $gateway = $mapper->getSqlmapGateway();
+
+ $value = $gateway->queryForObject('SelectInlineEscapeParam', "'1234567*123$456789$012345' AS foobar");
+ self::assertEquals('1234567*123$456789$012345', $value);
+
+ $value = $gateway->queryForObject('SelectInlineEscapeParam', '"1234567*123$456789$012345" AS foobar');
+ self::assertEquals('1234567*123$456789$012345', $value);
+
+ }
+
}
?>
\ No newline at end of file |