Example #1
0
 /**
  * Tests the setting options through the constructor.
  * 
  * @test
  * @covers Gmap::__construct
  * @covers Gmap::get_option
  */
 function test_constructor_options_parameter()
 {
     $options = array('abc' => 123, 'def' => TRUE, 'ghi' => FALSE, 'jkl' => array(), 'lat' => 12.34, 'lng' => 34.56, 'zoom' => 10, 'sensor' => TRUE, 'maptype' => 'terrain', 'view' => 'gmap_demo', 'gmap_size_x' => 666, 'gmap_size_y' => 333, 'gmap_controls' => array('maptype' => array('display' => FALSE), 'navigation' => array('display' => FALSE), 'scale' => array('display' => FALSE)));
     $map = new Gmap($options);
     $expected = array('lat' => 12.34, 'lng' => 34.56, 'zoom' => 10, 'sensor' => TRUE, 'maptype' => 'terrain', 'view' => 'gmap_demo', 'gmap_size_x' => 666, 'gmap_size_y' => 333, 'gmap_controls' => array('maptype' => array('display' => FALSE), 'navigation' => array('display' => FALSE), 'scale' => array('display' => FALSE)));
     $this->assertEquals($expected, $map->get_option());
 }