/** * @dataProvider providerIsClosed * * @param string $curve The WKT of the MultiCurve to test. * @param boolean $isClosed Whether the MultiCurve is closed. */ public function testIsClosed($curve, $isClosed) { $this->requiresGeometryEngine(); $curve = MultiCurve::fromText($curve); $this->skipIfUnsupportedGeometry($curve); if ($this->isGEOS('< 3.5.0')) { // GEOS PHP bindings do not support isClosed() on MultiCurve in older versions. $this->setExpectedException(GeometryEngineException::class); } $this->assertSame($isClosed, $curve->isClosed()); }
/** * Loads the underlying geometry. * * @return void * * @throws GeometryIOException If the proxy data is not valid. * @throws CoordinateSystemException If the resulting geometry contains mixed coordinate systems. * @throws InvalidGeometryException If the resulting geometry is not valid. * @throws UnexpectedGeometryException If the resulting geometry is not an instance of the proxied class. */ private function load() { $this->proxyGeometry = $this->proxyIsBinary ? MultiCurve::fromBinary($this->proxyData, $this->proxySRID) : MultiCurve::fromText($this->proxyData, $this->proxySRID); }