createDatabaseInterface(); $this->controller = new GisDataEditorController(new ResponseRenderer(), new Template(new Config())); } #[DataProvider('providerForTestValidateGisData')] #[Group('gis')] public function testValidateGisData(mixed $gisData, string $type, string|null $value, string $expected): void { /** @var string $gisData */ $gisData = $this->callFunction( $this->controller, GisDataEditorController::class, 'extractGisType', [ $gisData, $type, $value, ], ); self::assertSame($expected, $gisData); } /** @return iterable */ public static function providerForTestValidateGisData(): iterable { yield [ null, 'GEOMETRY', 'GEOMETRYCOLLECTION()', 'GEOMETRYCOLLECTION', ]; yield [ null, 'GEOMETRY', 'GEOMETRYCOLLECTION EMPTY', 'GEOMETRYCOLLECTION', ]; } }