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