Пример #1
0
 /**
  * @expectedException PHPUnit_Framework_Error
  */
 public function testIncorrectParser()
 {
     $Coordinate = new N\Coordinate();
     $Coordinate->setParser(new stdClass());
 }
Пример #2
0
 public function testGuessParserWithDMS()
 {
     $Coordinate = new N\Coordinate();
     $return = $Coordinate->guessParser('10 10 10N');
     $this->assertInstanceOf('Treffynnon\\Navigator\\Coordinate\\DmsParser', $return);
 }
Пример #3
0
 /**
  * Prime the coordinate parser with any additional information
  * necessary 
  */
 protected function primeCoordinateParsers()
 {
     $this->latitude->getParser()->setDirection(N::Lat);
     $this->longitude->getParser()->setDirection(N::Long);
 }