/**
  * @covers \OpenWeatherMap\Hydrator\Strategy\WindSpeedStrategy::extract
  */
 public function testExtract()
 {
     $mps = 12;
     $windSpeed = new WindSpeed();
     $windSpeed->setMps($mps);
     $windSpeedStrategy = new WindSpeedStrategy();
     $values = $windSpeedStrategy->extract($windSpeed);
     $this->assertArrayHasKey('mps', $values);
 }
예제 #2
0
 /**
  * @covers \OpenWeatherMap\Entity\WindSpeed::getMps
  * @covers \OpenWeatherMap\Entity\WindSpeed::setMps
  */
 public function testSetGetMps()
 {
     $mps = "3.91";
     $windSpeed = new WindSpeed();
     $this->assertNull($windSpeed->getMps());
     $this->assertSame($windSpeed, $windSpeed->setMps($mps));
     $this->assertEquals($mps, $windSpeed->getMps());
 }