Ejemplo n.º 1
0
 public function testRenderJsContainerInit()
 {
     $map = new Map();
     $map->setJavascriptVariable('map');
     $expected = 'map_container = {' . '"map":null,' . '"coordinates":{},' . '"bounds":{},' . '"points":{},' . '"sizes":{},' . '"circles":{},' . '"encoded_polylines":{},' . '"ground_overlays":{},' . '"polygons":{},' . '"polylines":{},' . '"rectangles":{},' . '"info_windows":{},' . '"marker_images":{},' . '"marker_shapes":{},' . '"markers":{},' . '"marker_cluster":null,' . '"kml_layers":{},' . '"event_manager":{"dom_events":{},"dom_events_once":{},"events":{},"events_once":{}},' . '"closable_info_windows":{},' . '"functions":{' . '"to_array":function (object) { var array = []; for (var key in object) { array.push(object[key]); } return array; }' . '}};' . PHP_EOL;
     $this->assertSame($expected, $this->mapHelper->renderJsContainerInit($map));
 }