Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit f608be8

Browse files
Added unit test for issue in quoteInto with $count and question mark in $value
1 parent f8b0e58 commit f608be8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/Zend/Db/Adapter/TestCommon.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,16 @@ public function testAdapterQuoteIntoCount()
12671267
'Incorrect quoteInto() result for count');
12681268
}
12691269

1270+
public function testAdapterQuoteIntoCountAndQuestionMark()
1271+
{
1272+
$string = 'foo = ? OR moo = ? OR boo = ?';
1273+
$param = 'What?';
1274+
$value = $this->_db->quoteInto($string, $param, null, 2);
1275+
$this->assertTrue(is_string($value));
1276+
$this->assertEquals("foo = 'What?' OR moo = 'What?' OR boo = ?", $value,
1277+
'Incorrect quoteInto() result for count and question mark in value');
1278+
}
1279+
12701280
public function testAdapterQuoteTypeInt()
12711281
{
12721282
foreach ($this->_numericDataTypes as $typeName => $type) {

0 commit comments

Comments
 (0)