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

Commit

Permalink
Added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Deroin committed Jun 21, 2016
1 parent 7544a66 commit d25f64d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/Zend/Db/Statement/MysqliTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ public function testStripQuoted()
$this->assertSame($out, $actual, $count . ' - unexpected output');
}
}

public function testStripQuotedForLongQuery()
{
$statementClass = 'Zend_Db_Statement_' . $this->getDriver();

$table = $this->_db->quoteIdentifier('zfproducts');
$column = $this->_db->quoteIdentifier('product_name');

$sql = 'SELECT * FROM `zfproducts` WHERE `product_name` = "%s"';

$columnContent = str_repeat('a', 15000) . '\\"' . str_repeat('b', 15000);
$sql = sprintf($sql, $columnContent);

$stmt = new $statementClass($this->_db, $sql);
$this->assertNotNull($stmt->getDriverStatement());
}

public function testStatementRowCount()
{
Expand Down

0 comments on commit d25f64d

Please sign in to comment.