/**
  * Create a rotate control
  */
 public function __construct()
 {
     parent::__construct();
 }
 /**
  * Checks the map rotate control getter & setter
  */
 public function testRotateControl()
 {
     $rotateControlTest = new Controls\RotateControl();
     $rotateControlTest->setControlPosition(Controls\ControlPosition::BOTTOM_CENTER);
     $this->assertFalse(self::$map->hasRotateControl());
     $this->assertFalse(self::$map->hasMapOption('rotateControl'));
     self::$map->setRotateControl($rotateControlTest);
     $this->assertTrue(self::$map->hasRotateControl());
     $this->assertEquals(self::$map->getRotateControl()->getControlPosition(), 'bottom_center');
     $this->assertTrue(self::$map->hasMapOption('rotateControl'));
     self::$map->setRotateControl(Controls\ControlPosition::BOTTOM_LEFT);
     $this->assertEquals(self::$map->getRotateControl()->getControlPosition(), 'bottom_left');
     self::$map->setRotateControl(null);
     $this->assertNull(self::$map->getRotateControl());
     $this->assertFalse(self::$map->hasMapOption('rotateControl'));
     $this->setExpectedException('InvalidArgumentException');
     self::$map->setRotateControl('foo');
 }
 /**
  * Renders the rotate control
  *
  * @param Ivory\GoogleMapBundle\Model\Controls\RotateControl $rotateControl
  * @return string HTML output
  */
 public function render(RotateControl $rotateControl)
 {
     return sprintf('{"position":%s}', $this->controlPositionHelper->render($rotateControl->getControlPosition()));
 }
 /**
  * Checks the render method
  */
 public function testRender()
 {
     $rotateControl = new RotateControl();
     $rotateControl->setControlPosition(ControlPosition::BOTTOM_CENTER);
     $this->assertEquals(self::$rotateControlHelper->render($rotateControl), '{"position":google.maps.ControlPosition.BOTTOM_CENTER}');
 }