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 bb80c6e
Show file tree
Hide file tree
Showing 2 changed files with 17 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
1 change: 1 addition & 0 deletions tests/Zend/Db/Statement/TestCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,3 +874,4 @@ public function testStatementCanReturnDriverStatement()
return $statement;
}
}

0 comments on commit bb80c6e

Please sign in to comment.