Browse Source

bugfix for postgis detection

Maurits van der Schee 7 years ago
parent
commit
73e2d88e6e
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      tests/MysqlTest.php
  2. 1
    1
      tests/PostgresqlTest.php

+ 1
- 1
tests/MysqlTest.php View File

@@ -92,7 +92,7 @@ class MysqlTest extends Tests
92 92
         $contents = file_get_contents($fixture);
93 93
 
94 94
         if (!($capabilities & self::GIS)) {
95
-            $contents = preg_replace('/(POINT|POLYGON) NOT NULL/i', 'text NOT NULL', $contents);
95
+            $contents = preg_replace('/(POINT|POLYGON)( NOT)? NULL/i', 'text\2 NULL', $contents);
96 96
             $contents = preg_replace('/ST_GeomFromText/i', 'concat', $contents);
97 97
         }
98 98
         if (!($capabilities & self::JSON)) {

+ 1
- 1
tests/PostgresqlTest.php View File

@@ -93,7 +93,7 @@ class PostgresqlTest extends Tests
93 93
         $contents = file_get_contents($fixture);
94 94
 
95 95
         if (!($capabilities & self::GIS)) {
96
-            $contents = preg_replace('/(geometry) NOT NULL/i', 'text NOT NULL', $contents);
96
+            $contents = preg_replace('/(geometry)( NOT)? NULL/i', 'text\2 NULL', $contents);
97 97
             $contents = preg_replace('/ST_GeomFromText/i', 'concat', $contents);
98 98
             $contents = preg_replace('/CREATE EXTENSION IF NOT EXISTS postgis;/i', '', $contents);
99 99
         }

Loading…
Cancel
Save