Browse Source

Capability fix for sqlite

Maurits van der Schee 7 years ago
parent
commit
b58f4ed8f5
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      tests/SqliteTest.php

+ 7
- 1
tests/SqliteTest.php View File

@@ -54,7 +54,6 @@ class SqliteTest extends Tests
54 54
     public function getCapabilities($db)
55 55
     {
56 56
         $capabilities = 0;
57
-        $capabilities |= self::JSON;
58 57
         return $capabilities;
59 58
     }
60 59
 
@@ -68,6 +67,13 @@ class SqliteTest extends Tests
68 67
         $fixture = __DIR__.'/data/blog_sqlite.sql';
69 68
         $contents = file_get_contents($fixture);
70 69
 
70
+        if (!($capabilities & self::GIS)) {
71
+            $contents = preg_replace('/GEOMETRY NOT NULL/i','text NOT NULL',$contents);
72
+        }
73
+        if (!($capabilities & self::JSON)) {
74
+            $contents = preg_replace('/JSON NOT NULL/i','text NOT NULL',$contents);
75
+        }
76
+
71 77
         $queries = preg_split('/;\s*\n/', $contents);
72 78
         array_pop($queries);
73 79
 

Loading…
Cancel
Save