コード例 #1
0
 /**
  * Checks the render bound method
  */
 public function testRenderBound()
 {
     $mapTest = new Model\Map();
     $boundTest = new Base\Bound();
     $boundTest->setSouthWest(-1.1, 2.1, true);
     $boundTest->setNorthEast(1.1, 2.1, true);
     $mapTest->setBound($boundTest);
     $this->assertEquals(self::$mapHelper->renderBound($mapTest), 'var ' . $mapTest->getBound()->getJavascriptVariable() . ' = new google.maps.LatLngBounds(new google.maps.LatLng(-1.1, 2.1, true), new google.maps.LatLng(1.1, 2.1, true));' . PHP_EOL . $mapTest->getJavascriptVariable() . '.fitBounds(' . $mapTest->getBound()->getJavascriptVariable() . ');' . PHP_EOL);
 }