コード例 #1
0
 protected function setUp()
 {
     $this->mockFrontEnd = $this->getMock('tslib_fe', array('dummy'), array(), '', FALSE);
     $GLOBALS['TSFE'] = $this->mockFrontEnd;
     $this->mapPointWithCoordinates = $this->getMock('tx_oelib_Interface_MapPoint');
     $this->mapPointWithCoordinates->expects(self::any())->method('hasGeoCoordinates')->will(self::returnValue(TRUE));
     $this->mapPointWithCoordinates->expects(self::any())->method('getGeoCoordinates')->will(self::returnValue(array('latitude' => 1.2, 'longitude' => 3.4)));
     $this->subject = new Tx_Oelib_ViewHelpers_GoogleMapsViewHelper();
 }