Skip to content

Commit a196e7e

Browse files
Alex Seriycmfcmf
authored andcommitted
Fixed integration tests. Parameterized virtual service location. (#77)
1 parent 96e95ef commit a196e7e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ before_install:
2020
- sudo apt-get -qq update
2121
- sudo apt-get install -y socat
2222
- cat /etc/hosts
23-
- sudo socat TCP-LISTEN:80,fork TCP:184.170.226.124:3128 > /tmp/socat.log 2>&1 &
23+
- sudo socat TCP-LISTEN:80,fork TCP:${RTCP_HOST}:${RTCP_PORT} > /tmp/socat.log 2>&1 &
2424

2525
install:
2626
- composer install

integTests/CurrentWeatherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testCityNotFound()
7272

7373
public function testByCityCountry()
7474
{
75-
$weather = $this->owm->getWeather('London,ON');
75+
$weather = $this->owm->getWeather('London,CA');
7676

7777
// Geo coordinates
7878
$this->assertEquals('-81.23', $weather->city->lon);

integTests/ForecastDailyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testTemperatureImperial()
114114

115115
public function testWindMetric()
116116
{
117-
$forecast = $this->owm->getWeatherForecast('Moscow', 'metric', 'ru', '', 9);
117+
$forecast = $this->owm->getWeatherForecast('Moscow', 'metric', 'ru', '', 7);
118118

119119
$this->assertEquals('Moscow', $forecast->city->name);
120120
$this->assertEquals('RU', $forecast->city->country);
@@ -125,7 +125,7 @@ public function testWindMetric()
125125
$this->assertEquals('03:22:56', $forecast->sun->rise->format("H:i:s"));
126126
$this->assertEquals('15:50:08', $forecast->sun->set->format("H:i:s"));
127127

128-
$this->assertEquals(9, iterator_count($forecast));
128+
$this->assertEquals(7, iterator_count($forecast));
129129

130130
$forecast_arr = iterator_to_array($forecast);
131131

0 commit comments

Comments
 (0)