Explorar el Código

bugfix for postgis detection

Maurits van der Schee hace 7 años
padre
commit
73e2d88e6e
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1
    1
      tests/MysqlTest.php
  2. 1
    1
      tests/PostgresqlTest.php

+ 1
- 1
tests/MysqlTest.php Ver fichero

@@ -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 Ver fichero

@@ -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…
Cancelar
Guardar