You are here

public function DmsConverterTest::testConverter in Geofield 8

@covers ::dmsToDecimal @covers ::decimalToDms

@dataProvider dataProvider

File

tests/src/Unit/DmsConverterTest.php, line 21

Class

DmsConverterTest
@coversDefaultClass \Drupal\geofield\DmsConverter @group geofield

Namespace

Drupal\Tests\geofield\Unit

Code

public function testConverter(DmsPoint $dms, $decimal) {
  $result = DmsConverter::dmsToDecimal($dms);
  $this
    ->assertEquals($decimal, $result);
  $result = DmsConverter::decimalToDms($decimal[0], $decimal[1]);
  $this
    ->assertEquals($dms, $result);
}