You are here

function test_detection in geoPHP 8

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

File

geoPHP/tests/test.php, line 260
Uncomment to test.

Code

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

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