/** * @covers Zend\Db\Adapter\Platform\IbmDb2::quoteValueList */ public function testQuoteValueList() { if (!function_exists('db2_escape_string')) { $this->setExpectedException('PHPUnit_Framework_Error', 'Attempting to quote a value in Zend\\Db\\Adapter\\Platform\\IbmDb2 without extension/driver support can introduce security vulnerabilities in a production environment'); } $this->assertEquals("'Foo O''Bar'", $this->platform->quoteValueList("Foo O'Bar")); }
/** * @covers Zend\Db\Adapter\Platform\IbmDb2::quoteValueList */ public function testQuoteValueList() { $this->assertEquals("'Foo O\\'Bar'", $this->platform->quoteValueList("Foo O'Bar")); $this->assertEquals("'Foo O\\'Bar'", $this->platform->quoteValueList(array("Foo O'Bar"))); $this->assertEquals("'value', 'Foo O\\'Bar'", $this->platform->quoteValueList(array('value', "Foo O'Bar"))); }