Skip to content

Commit 5d5465d

Browse files
committed
adjust test when SKIP_CURL=1 and PROXY set
1 parent 173e26c commit 5d5465d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/GeocoderTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,15 @@ public function testProxy()
8888
} catch (\Exception $e) {
8989
$this->markTestSkipped('PROXY environment variable is not a valid proxy URL: ' . $proxy);
9090
}
91-
$query = "82 Clerkenwell Road, London";
92-
$result = $geocoder->geocode($query);
9391

94-
// print_r($result);
92+
if (getenv('SKIP_CURL')) {
93+
$this->expectException(\Exception::class);
94+
$this->expectExceptionMessage('Proxy support requires the CURL extension');
95+
$geocoder->geocode("82 Clerkenwell Road, London");
96+
return;
97+
}
9598

99+
$result = $geocoder->geocode("82 Clerkenwell Road, London");
96100
$this->assertEquals(200, $result['status']['code']);
97101
$this->assertEquals('OK', $result['status']['message']);
98102
}

0 commit comments

Comments
 (0)