/** * Checks the render method */ public function testRender() { $mapTest = new Map(); $circleTest = new Circle(); $circleTest->setCenter(new Coordinate(1.1, 2.1, true)); $circleTest->setRadius(2); $circleTest->setOptions(array('option1' => 'value1', 'option2' => 'value2')); $this->assertEquals(self::$circleHelper->render($circleTest, $mapTest), 'var ' . $circleTest->getJavascriptVariable() . ' = new google.maps.Circle({"map":' . $mapTest->getJavascriptVariable() . ',"center":new google.maps.LatLng(1.1, 2.1, true),"radius":2,"option1":"value1","option2":"value2"});' . PHP_EOL); }
/** * Checks the render circles method */ public function testRenderCircles() { $mapTest = new Model\Map(); $circleTest = new Overlays\Circle(); $circleTest->setCenter(new Base\Coordinate(1.1, 2.1, true)); $circleTest->setRadius(2); $mapTest->addCircle($circleTest); $this->assertEquals(self::$mapHelper->renderCircles($mapTest), 'var ' . $circleTest->getJavascriptVariable() . ' = new google.maps.Circle({"map":' . $mapTest->getJavascriptVariable() . ',"center":new google.maps.LatLng(1.1, 2.1, true),"radius":2});' . PHP_EOL); }