Run common batch insert tests for SQLite

This commit is contained in:
Alexander Makarov
2017-01-28 14:41:57 +03:00
parent 920877c815
commit 1cc327f108

View File

@ -59,7 +59,14 @@ class QueryBuilderTest extends \yiiunit\framework\db\QueryBuilderTest
$this->markTestSkipped('Comments are not supported in SQLite'); $this->markTestSkipped('Comments are not supported in SQLite');
} }
public function testBatchInsert() public function batchInsertProvider()
{
$data = parent::batchInsertProvider();
$data['escape-danger-chars']['expected'] = "INSERT INTO `customer` (`address`) VALUES ('SQL-danger chars are escaped: ''); --')";
return $data;
}
public function testBatchInsertOnOlderVersions()
{ {
$db = $this->getConnection(); $db = $this->getConnection();
if (version_compare($db->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '3.7.11', '>=')) { if (version_compare($db->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '3.7.11', '>=')) {