/** * Creates a default marker cluster helper. * * @param \Ivory\GoogleMap\Helper\Overlays\MarkerCluster\MarkerHelper $markerHelper The marker helper. * @param \Ivory\GoogleMap\Helper\Overlays\InfoWindowHelper $infoWindowHelper The info window helper. */ public function __construct(MarkerHelper $markerHelper = null, InfoWindowHelper $infoWindowHelper = null) { parent::__construct($markerHelper); if ($infoWindowHelper === null) { $infoWindowHelper = new InfoWindowHelper(); } $this->setInfoWindowHelper($infoWindowHelper); }
public function testInitialState() { $markerHelper = $this->getMock('Ivory\\GoogleMap\\Helper\\Overlays\\MarkerHelper'); $this->helper = $this->getMockBuilder('Ivory\\GoogleMap\\Helper\\Overlays\\MarkerCluster\\AbstractMarkerClusterHelper')->setConstructorArgs(array($markerHelper))->getMockForAbstractClass(); $this->assertSame($markerHelper, $this->helper->getMarkerHelper()); }