diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index a9be34df1a..a67dae2321 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -5,6 +5,11 @@
colors="true"
verbose="true">
+
+
+
+
+
test/classes
diff --git a/test/bootstrap-dist.php b/test/bootstrap-dist.php
index 20c2246377..613f7f438e 100644
--- a/test/bootstrap-dist.php
+++ b/test/bootstrap-dist.php
@@ -1,7 +1,4 @@
markTestSkipped('GD extension missing!');
}
+ $image = imagecreatetruecolor(120, 150);
+ $this->assertNotFalse($image);
$return = $this->object->prepareRowAsPng(
'GEOMETRYCOLLECTION(POLYGON((35 10,10 20,15 40,45 45,35 10),'
. '(20 30,35 32,30 20,20 30)))',
'image',
'#B02EE0',
['x' => 12, 'y' => 69, 'scale' => 2, 'height' => 150],
- imagecreatetruecolor(120, 150)
+ $image
);
$this->assertEquals(120, imagesx($return));
$this->assertEquals(150, imagesy($return));
diff --git a/test/classes/Gis/GisLineStringTest.php b/test/classes/Gis/GisLineStringTest.php
index a584615662..2897cf92ee 100644
--- a/test/classes/Gis/GisLineStringTest.php
+++ b/test/classes/Gis/GisLineStringTest.php
@@ -174,12 +174,14 @@ class GisLineStringTest extends GisGeomTestCase
$this->markTestSkipped('GD extension missing!');
}
+ $image = imagecreatetruecolor(120, 150);
+ $this->assertNotFalse($image);
$return = $this->object->prepareRowAsPng(
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
'image',
'#B02EE0',
['x' => 12, 'y' => 69, 'scale' => 2, 'height' => 150],
- imagecreatetruecolor(120, 150)
+ $image
);
$this->assertImage($return);
}
diff --git a/test/classes/Gis/GisMultiLineStringTest.php b/test/classes/Gis/GisMultiLineStringTest.php
index 0b9b74a09b..ee009deb27 100644
--- a/test/classes/Gis/GisMultiLineStringTest.php
+++ b/test/classes/Gis/GisMultiLineStringTest.php
@@ -256,12 +256,14 @@ class GisMultiLineStringTest extends GisGeomTestCase
$this->markTestSkipped('GD extension missing!');
}
+ $image = imagecreatetruecolor(120, 150);
+ $this->assertNotFalse($image);
$return = $this->object->prepareRowAsPng(
'MULTILINESTRING((36 14,47 23,62 75),(36 10,17 23,178 53))',
'image',
'#B02EE0',
['x' => 12, 'y' => 69, 'scale' => 2, 'height' => 150],
- imagecreatetruecolor(120, 150)
+ $image
);
$this->assertImage($return);
}
diff --git a/test/classes/Gis/GisMultiPointTest.php b/test/classes/Gis/GisMultiPointTest.php
index 4ec33692e0..ad0ac6ee01 100644
--- a/test/classes/Gis/GisMultiPointTest.php
+++ b/test/classes/Gis/GisMultiPointTest.php
@@ -176,12 +176,14 @@ class GisMultiPointTest extends GisGeomTestCase
$this->markTestSkipped('GD extension missing!');
}
+ $image = imagecreatetruecolor(120, 150);
+ $this->assertNotFalse($image);
$return = $this->object->prepareRowAsPng(
'MULTIPOINT(12 35,48 75,69 23,25 45,14 53,35 78)',
'image',
'#B02EE0',
['x' => 12, 'y' => 69, 'scale' => 2, 'height' => 150],
- imagecreatetruecolor(120, 150)
+ $image
);
$this->assertImage($return);
}
diff --git a/test/classes/Gis/GisMultiPolygonTest.php b/test/classes/Gis/GisMultiPolygonTest.php
index 8b3bd8a5b8..ecbd417470 100644
--- a/test/classes/Gis/GisMultiPolygonTest.php
+++ b/test/classes/Gis/GisMultiPolygonTest.php
@@ -343,13 +343,15 @@ class GisMultiPolygonTest extends GisGeomTestCase
$this->markTestSkipped('GD extension missing!');
}
+ $image = imagecreatetruecolor(120, 150);
+ $this->assertNotFalse($image);
$return = $this->object->prepareRowAsPng(
'MULTIPOLYGON(((136 40,147 83,16 75,136 40)),'
. '((105 0,56 20,78 73,105 0)))',
'image',
'#B02EE0',
['x' => 12, 'y' => 69, 'scale' => 2, 'height' => 150],
- imagecreatetruecolor(120, 150)
+ $image
);
$this->assertImage($return);
}
diff --git a/test/classes/Gis/GisPointTest.php b/test/classes/Gis/GisPointTest.php
index fd86b8800b..8380fb3ad1 100644
--- a/test/classes/Gis/GisPointTest.php
+++ b/test/classes/Gis/GisPointTest.php
@@ -185,17 +185,20 @@ class GisPointTest extends GisGeomTestCase
];
}
- public function testPrepareRowAsPng(): void {
+ public function testPrepareRowAsPng(): void
+ {
if (! function_exists('imagecreatetruecolor')) {
$this->markTestSkipped('GD extension missing!');
}
+ $image = imagecreatetruecolor(120, 150);
+ $this->assertNotFalse($image);
$return = $this->object->prepareRowAsPng(
'POINT(12 35)',
'image',
'#B02EE0',
['x' => 12, 'y' => 69, 'scale' => 2, 'height' => 150],
- imagecreatetruecolor(120, 150)
+ $image
);
$this->assertImage($return);
}
diff --git a/test/classes/Gis/GisPolygonTest.php b/test/classes/Gis/GisPolygonTest.php
index 5ae2d1a2e2..c0d216d900 100644
--- a/test/classes/Gis/GisPolygonTest.php
+++ b/test/classes/Gis/GisPolygonTest.php
@@ -433,12 +433,14 @@ class GisPolygonTest extends GisGeomTestCase
$this->markTestSkipped('GD extension missing!');
}
+ $image = imagecreatetruecolor(120, 150);
+ $this->assertNotFalse($image);
$return = $this->object->prepareRowAsPng(
'POLYGON((123 0,23 30,17 63,123 0))',
'image',
'#B02EE0',
['x' => 12, 'y' => 69, 'scale' => 2, 'height' => 150],
- imagecreatetruecolor(120, 150)
+ $image
);
$this->assertImage($return);
}