protected function handlePolygonParams(array &$params, Polygon &$polygon) { if ($fillColor = array_shift($params)) { $polygon->setFillColor($fillColor); } if ($fillOpacity = array_shift($params)) { $polygon->setFillOpacity($fillOpacity); } if ($showOnlyOnHover = array_shift($params)) { $polygon->setOnlyVisibleOnHover(strtolower(trim($showOnlyOnHover)) === 'on'); } }
/** * @dataProvider instanceProvider * @param Polygon $polygon * @param array $arguments */ public function testSetFillColor(Polygon $polygon, array $arguments) { $polygon->setFillColor('#FFCCCC'); $this->assertHasJsonKeyWithValue($polygon, 'fillColor', '#FFCCCC'); }