public function testRenderJsContainerEncodedPolylines() { $map = new Map(); $map->setJavascriptVariable('map'); $map->addEncodedPolyline($encodedPolyline = new EncodedPolyline('foo')); $encodedPolyline->setJavascriptVariable('encoded_polyline'); $expected = <<<EOF map_container.encoded_polylines.encoded_polyline = encoded_polyline = new google.maps.Polyline({"map":map,"path":google.maps.geometry.encoding.decodePath("foo")}); EOF; $this->assertSame($expected, $this->mapHelper->renderJsContainerEncodedPolylines($map)); }