set() public method

Sets the coordinate using the parser to a radian value
public set ( float $coord )
$coord float
示例#1
0
 /**
  * @dataProvider coordInvalidLongProvider
  * @expectedException Treffynnon\Navigator\Exception\InvalidCoordinateValueException
  */
 public function testInvalidSetLongCoordinate($coord)
 {
     $Coordinate = new N\Coordinate();
     // must set a parser and direction
     $Coordinate->setParser(new C\DecimalParser(N::LONG));
     $Coordinate->set($coord);
     $coord_out = (string) $Coordinate;
     $this->assertInternalType('string', $coord_out);
     $this->assertEquals($coord, $coord_out, '', 0.2);
 }