public function testQuoteValueWithPdoPgsql() { if (!$this->adapters['pdo_pgsql'] instanceof \PDO) { $this->markTestSkipped('Postgres (PDO_PGSQL) not configured in unit test configuration file'); } $pgsql = new Postgresql($this->adapters['pdo_pgsql']); $value = $pgsql->quoteValue('value'); $this->assertEquals('\'value\'', $value); $pgsql = new Postgresql(new Pdo\Pdo(new Pdo\Connection($this->adapters['pdo_pgsql']))); $value = $pgsql->quoteValue('value'); $this->assertEquals('\'value\'', $value); }
/** * @covers Zend\Db\Adapter\Platform\Postgresql::quoteValue */ public function testQuoteValue() { $this->setExpectedException('PHPUnit_Framework_Error', 'Attempting to quote a value in Zend\\Db\\Adapter\\Platform\\Postgresql without extension/driver support can introduce security vulnerabilities in a production environment'); $this->assertEquals("'value'", $this->platform->quoteValue('value')); }
/** * @covers Zend\Db\Adapter\Platform\Postgresql::quoteValue */ public function testQuoteValue() { $this->assertEquals("'value'", $this->platform->quoteValue('value')); }