From 1cc327f108d83b10e50ae2f364dd057cd76ac489 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Sat, 28 Jan 2017 14:41:57 +0300 Subject: [PATCH] Run common batch insert tests for SQLite --- tests/framework/db/sqlite/QueryBuilderTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/framework/db/sqlite/QueryBuilderTest.php b/tests/framework/db/sqlite/QueryBuilderTest.php index ec1934a352..551f787dd1 100644 --- a/tests/framework/db/sqlite/QueryBuilderTest.php +++ b/tests/framework/db/sqlite/QueryBuilderTest.php @@ -59,7 +59,14 @@ class QueryBuilderTest extends \yiiunit\framework\db\QueryBuilderTest $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(); if (version_compare($db->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '3.7.11', '>=')) {