function run_test in geoPHP 7
Same name in this branch
- 7 geoPHP/tests/test.php \run_test()
- 7 geoPHP/tests/postgis.php \run_test()
Same name and namespace in other branches
- 8 geoPHP/tests/test.php \run_test()
File
- geoPHP/
tests/ test.php, line 11
Code
function run_test() {
set_time_limit(0);
set_error_handler("FailOnError");
header("Content-type: text");
include_once '../geoPHP.inc';
if (geoPHP::geosInstalled()) {
print "GEOS is installed.\n";
}
else {
print "GEOS is not installed.\n";
}
foreach (scandir('./input') as $file) {
$parts = explode('.', $file);
if ($parts[0]) {
$format = $parts[1];
$value = file_get_contents('./input/' . $file);
print '---- Testing ' . $file . "\n";
$geometry = geoPHP::load($value, $format);
test_adapters($geometry, $format, $value);
test_methods($geometry);
test_geometry($geometry);
test_detection($value, $format, $file);
}
}
print "\33[32m" . "PASS" . "\33[39m\n";
}