Example #1
0
 /**
  * @see ValueParserTestBase::validInputProvider
  *
  * @since 3.0
  *
  * @return array
  */
 public function validInputProvider()
 {
     $argLists = array();
     $valid = array('55.7557860 N, 37.6176330 W' => array(55.755786, -37.617633), '55.7557860, -37.6176330' => array(55.755786, -37.617633), '55 S, 37.6176330 W' => array(-55, -37.617633), '-55, -37.6176330' => array(-55, -37.617633), '5.5S,37W ' => array(-5.5, -37), '-5.5,-37 ' => array(-5.5, -37), '4,2' => array(4, 2));
     foreach ($valid as $value => $expected) {
         $expected = new Location(new LatLongValue($expected[0], $expected[1]));
         $argLists[] = array((string) $value, $expected);
     }
     $location = new Location(new LatLongValue(4, 2));
     $location->setTitle('Title');
     $location->setText('some description');
     $argLists[] = array('4,2~Title~some description', $location);
     return $argLists;
 }