/** * Test that we can extract the values from a Meta instance * * @covers \OpenWeatherMap\Hydrator\Strategy\MetaStrategy::extract */ public function testExtract() { $calctime = 0.0032; $meta = new Meta(); $meta->setCalcTime($calctime); $strategy = new MetaStrategy(); $values = $strategy->extract($meta); $this->assertArrayHasKey('calcTime', $values); $this->assertEquals($values['calcTime'], $calctime); }
/** * @expectedException InvalidArgumentException * @covers \OpenWeatherMap\Entity\Meta::setCalctime */ public function testSetCalcTimeThrowsException() { $meta = new Meta(); $meta->setCalcTime(new stdClass()); }