Skip to content
This repository was archived by the owner on May 16, 2018. It is now read-only.

Commit d25f64d

Browse files
committed
Added unit test
1 parent 7544a66 commit d25f64d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/Zend/Db/Statement/MysqliTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,22 @@ public function testStripQuoted()
149149
$this->assertSame($out, $actual, $count . ' - unexpected output');
150150
}
151151
}
152+
153+
public function testStripQuotedForLongQuery()
154+
{
155+
$statementClass = 'Zend_Db_Statement_' . $this->getDriver();
156+
157+
$table = $this->_db->quoteIdentifier('zfproducts');
158+
$column = $this->_db->quoteIdentifier('product_name');
159+
160+
$sql = 'SELECT * FROM `zfproducts` WHERE `product_name` = "%s"';
161+
162+
$columnContent = str_repeat('a', 15000) . '\\"' . str_repeat('b', 15000);
163+
$sql = sprintf($sql, $columnContent);
164+
165+
$stmt = new $statementClass($this->_db, $sql);
166+
$this->assertNotNull($stmt->getDriverStatement());
167+
}
152168

153169
public function testStatementRowCount()
154170
{

0 commit comments

Comments
 (0)