Example #1
0
 public function testGEOSVersion()
 {
     $this->assertContains('-CAPI-', GEOSVersion());
 }
Example #2
0
 /**
  * @param string|null $operatorAndVersion An optional version to satisfy.
  *
  * @return boolean
  */
 protected final function isGEOS($operatorAndVersion = null)
 {
     $engine = GeometryEngineRegistry::get();
     if ($engine instanceof GEOSEngine) {
         if ($operatorAndVersion === null) {
             return true;
         }
         $version = GEOSVersion();
         $dashPos = strpos($version, '-');
         if ($dashPos !== false) {
             $version = substr($version, 0, $dashPos);
         }
         return $this->isVersion($version, $operatorAndVersion);
     }
     return false;
 }