Пример #1
0
 public function testQuoteValueWithSqlServer()
 {
     if (!$this->adapters['pdo_sqlsrv']) {
         $this->markTestSkipped('SQLServer (pdo_sqlsrv) not configured in unit test configuration file');
     }
     $sqlite = new SqlServer($this->adapters['pdo_sqlsrv']);
     $value = $sqlite->quoteValue('value');
     $this->assertEquals('\'value\'', $value);
 }
Пример #2
0
 /**
  * @covers Zend\Db\Adapter\Platform\SqlServer::quoteValue
  */
 public function testQuoteValue()
 {
     $this->assertEquals("'value'", $this->platform->quoteValue('value'));
 }
Пример #3
0
 /**
  * @covers Zend\Db\Adapter\Platform\SqlServer::quoteValue
  */
 public function testQuoteValue()
 {
     $this->setExpectedException('PHPUnit_Framework_Error', 'Attempting to quote a value in Zend\\Db\\Adapter\\Platform\\SqlServer without extension/driver support can introduce security vulnerabilities in a production environment');
     $this->assertEquals("'value'", $this->platform->quoteValue('value'));
 }