diff options
author | Simon Holywell <[email protected]> | 2018-01-04 10:05:05 +1000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2018-01-04 10:05:11 +1000 |
commit | 79f92243a35e20c4ce5d33f16d05dc25d8c783e5 (patch) | |
tree | 7618ebea1213ccef52681f84151d182177513e60 | |
parent | 5f220f371dc250b1c65dfb5f767ebc8b8b40a92d (diff) |
individually insert test rows for SQLite pre 3.7.11
-rw-r--r-- | test/CacheIntegrationTest.php | 9 |
1 files changed, 8 insertions, 1 deletions
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() { |