From 79f92243a35e20c4ce5d33f16d05dc25d8c783e5 Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Thu, 4 Jan 2018 10:05:05 +1000 Subject: individually insert test rows for SQLite pre 3.7.11 --- test/CacheIntegrationTest.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/CacheIntegrationTest.php b/test/CacheIntegrationTest.php index ae56880..0a5dc61 100644 --- a/test/CacheIntegrationTest.php +++ b/test/CacheIntegrationTest.php @@ -8,7 +8,14 @@ class CacheIntegrationTest extends PHPUnit_Framework_TestCase { ORM::configure('caching', true); ORM::raw_execute('CREATE TABLE `league` ( `class_id` INTEGER )'); - ORM::raw_execute('INSERT INTO `league`(`class_id`) VALUES (1), (2), (3)'); + // needs to be individually inserted to support SQLite before + // version 3.7.11 + ORM::raw_execute('INSERT INTO `league`(`class_id`) VALUES (1)'); + ORM::raw_execute('INSERT INTO `league`(`class_id`) VALUES (2)'); + ORM::raw_execute('INSERT INTO `league`(`class_id`) VALUES (3)'); + + $x = ORM::for_table('league')->count(); + $this->assertEquals(3, $x); } public function tearDown() { -- cgit v1.2.3