/**
  * Checks the render method
  */
 public function testRender()
 {
     $scaleControlTest = new ScaleControl();
     $scaleControlTest->setControlPosition(ControlPosition::BOTTOM_CENTER);
     $scaleControlTest->setScaleControlStyle(ScaleControlStyle::DEFAULT_);
     $this->assertEquals(self::$scaleControlHelper->render($scaleControlTest), '{"position":google.maps.ControlPosition.BOTTOM_CENTER,"style":google.maps.ScaleControlStyle.DEFAULT}');
 }
 /**
  * Checks the map scale control getter & setter
  */
 public function testScaleControl()
 {
     $scaleControlTest = new Controls\ScaleControl();
     $scaleControlTest->setControlPosition(Controls\ControlPosition::BOTTOM_CENTER);
     $scaleControlTest->setScaleControlStyle(Controls\ScaleControlStyle::DEFAULT_);
     $this->assertFalse(self::$map->hasScaleControl());
     $this->assertFalse(self::$map->hasMapOption('scaleControl'));
     self::$map->setScaleControl($scaleControlTest);
     $this->assertTrue(self::$map->hasScaleControl());
     $this->assertEquals(self::$map->getScaleControl()->getControlPosition(), 'bottom_center');
     $this->assertEquals(self::$map->getScaleControl()->getScaleControlStyle(), 'default');
     $this->assertTrue(self::$map->hasMapOption('scaleControl'));
     self::$map->setScaleControl(Controls\ControlPosition::BOTTOM_LEFT, Controls\ScaleControlStyle::DEFAULT_);
     $this->assertEquals(self::$map->getScaleControl()->getControlPosition(), 'bottom_left');
     $this->assertEquals(self::$map->getScaleControl()->getScaleControlStyle(), 'default');
     self::$map->setScaleControl(null);
     $this->assertNull(self::$map->getScaleControl());
     $this->assertFalse(self::$map->hasMapOption('scaleControl'));
     $this->setExpectedException('InvalidArgumentException');
     self::$map->setScaleControl('foo');
 }