Skip to content

Commit

Permalink
Minor updates to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phayes committed Aug 27, 2012
1 parent 6ac61fc commit 54eab05
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# run_test();

function run_test() {
set_time_limit(0);

header("Content-type: text");

include_once('../geoPHP.inc');
Expand Down Expand Up @@ -119,12 +121,8 @@ function test_adapters($geometry, $format, $input) {
$test_geom_1 = $adapter_loader->read($output);
$test_geom_2 = $adapter_loader->read($test_geom_1->out($adapter_key));

// Check to make sure a round-trip results in the same geometry
// We don't check round-trip accuracy on geohash as it's not a storage format that preserves information
if ($adapter_key != 'geohash') {
if ($test_geom_1->out('wkt') != $test_geom_2->out('wkt')) {
print "Mismatched adapter output in ".$adapter_class."\n";
}
if ($test_geom_1->out('wkt') != $test_geom_2->out('wkt')) {
print "Mismatched adapter output in ".$adapter_class."\n";
}
}
else {
Expand Down

0 comments on commit 54eab05

Please sign in to comment.