You are here

function test_detection in geoPHP 7

Same name and namespace in other branches
  1. 8 geoPHP/tests/test.php \test_detection()
1 call to test_detection()
run_test in geoPHP/tests/test.php

File

geoPHP/tests/test.php, line 244

Code

function test_detection($value, $format, $file) {
  $detected = geoPHP::detectFormat($value);
  if ($detected != $format) {
    if ($detected) {
      print 'detected as ' . $detected . "\n";
    }
    else {
      print "format not detected\n";
    }
  }

  // Make sure it loads using auto-detect
  geoPHP::load($value);
}