Skip to content
This repository was archived by the owner on May 16, 2018. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added unit test for issue in quoteInto with $count and question mark …
…in $value
  • Loading branch information
ivan-ponomarev committed Nov 14, 2014
commit f608be8f717470acd060535f8b1f72a43f21c3d9
10 changes: 10 additions & 0 deletions tests/Zend/Db/Adapter/TestCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -1267,6 +1267,16 @@ public function testAdapterQuoteIntoCount()
'Incorrect quoteInto() result for count');
}

public function testAdapterQuoteIntoCountAndQuestionMark()
{
$string = 'foo = ? OR moo = ? OR boo = ?';
$param = 'What?';
$value = $this->_db->quoteInto($string, $param, null, 2);
$this->assertTrue(is_string($value));
$this->assertEquals("foo = 'What?' OR moo = 'What?' OR boo = ?", $value,
'Incorrect quoteInto() result for count and question mark in value');
}

public function testAdapterQuoteTypeInt()
{
foreach ($this->_numericDataTypes as $typeName => $type) {
Expand Down