Cmfcmf\OpenWeatherMap\IntegTests\ForecastDailyTest::testWindMetric PHP Method

testWindMetric() public method

public testWindMetric ( )
    public function testWindMetric()
    {
        $forecast = $this->owm->getWeatherForecast('Moscow', 'metric', 'ru', '', 7);
        $this->assertEquals('Moscow', $forecast->city->name);
        $this->assertEquals('RU', $forecast->city->country);
        $this->assertEquals(524901, $forecast->city->id);
        $this->assertEquals('37.615555', $forecast->city->lon);
        $this->assertEquals('55.75222', $forecast->city->lat);
        $this->assertEquals('03:22:56', $forecast->sun->rise->format("H:i:s"));
        $this->assertEquals('15:50:08', $forecast->sun->set->format("H:i:s"));
        $this->assertEquals(7, iterator_count($forecast));
        $forecast_arr = iterator_to_array($forecast);
        $this->assertEquals('5.41 m/s', $forecast_arr[0]->wind->speed);
        $this->assertEquals('61 ENE', $forecast_arr[1]->wind->direction);
    }