public function testRenderJsContainerRectangles() { $map = new Map(); $map->setJavascriptVariable('map'); $map->addRectangle($rectangle = new Rectangle()); $rectangle->setJavascriptVariable('rectangle'); $rectangle->getBound()->setJavascriptVariable('rectangle_bound'); $expected = <<<EOF map_container.rectangles.rectangle = rectangle = new google.maps.Rectangle({"map":map,"bounds":rectangle_bound}); EOF; $this->assertSame($expected, $this->mapHelper->renderJsContainerRectangles($map)); }