Parcourir la source

bugfix for postgis detection

Maurits van der Schee il y a 7 ans
Parent
révision
73e2d88e6e
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1
    1
      tests/MysqlTest.php
  2. 1
    1
      tests/PostgresqlTest.php

+ 1
- 1
tests/MysqlTest.php Voir le fichier

@@ -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 Voir le fichier

@@ -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…
Annuler
Enregistrer