Skip to content

Commit 3f1e34d

Browse files
committed
Remove not-so-forecast tests
1 parent bd4d68b commit 3f1e34d

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

tests/FakeData.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function forecastXML()
6565
</meta>
6666
<sun rise="2016-12-28T07:17:18" set="2016-12-28T14:59:55"></sun>
6767
<forecast>
68-
<time day="2016-12-20">
68+
<time day="' . date('Y-m-d', time() + 0) . '">
6969
<symbol number="500" name="light rain" var="10d"></symbol>
7070
<precipitation value="0.25" type="rain"></precipitation>
7171
<windDirection deg="315" code="NW" name="Northwest"></windDirection>
@@ -75,7 +75,7 @@ public static function forecastXML()
7575
<humidity value="97" unit="%"></humidity>
7676
<clouds value="overcast clouds" all="92" unit="%"></clouds>
7777
</time>
78-
<time day="' . date('Y-m-d') . '">
78+
<time day="' . date('Y-m-d', time() + 3600) . '">
7979
<symbol number="500" name="light rain" var="10d"></symbol>
8080
<precipitation value="0.24" type="rain"></precipitation>
8181
<windDirection deg="253" code="WSW" name="West-southwest"></windDirection>

tests/OpenWeatherMap/WeatherForecastTest.php

+2-9
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,12 @@ public function testCurrent()
5555

5656
public function testNext()
5757
{
58-
$this->forecast->rewind();
5958
$this->forecast->next();
60-
$result = $this->forecast->valid();
61-
62-
$this->assertFalse($result);
59+
$this->assertTrue($this->forecast->valid());
6360
}
6461

6562
public function testValid()
6663
{
67-
$this->forecast->rewind();
68-
$this->forecast->next();
69-
$result = $this->forecast->valid();
70-
71-
$this->assertFalse($result);
64+
$this->assertTrue($this->forecast->valid());
7265
}
7366
}

0 commit comments

Comments
 (0)