@@ -361,9 +361,9 @@ public function testMapRawDataIncorrectlyFormatedGPSData()
361361 $ result = $ this ->mapper ->mapRawData (
362362 array (
363363 \PHPExif \Mapper \ImageMagick::GPSLATITUDE => '40/1 20/1 42857/100000 ' ,
364- 'GPS :GPSLatitudeRef ' => 'N ' ,
364+ 'exif :GPSLatitudeRef ' => 'N ' ,
365365 \PHPExif \Mapper \ImageMagick::GPSLONGITUDE => '20/1 10/1 233333/100000 ' ,
366- 'GPS :GPSLongitudeRef ' => 'W ' ,
366+ 'exif :GPSLongitudeRef ' => 'W ' ,
367367 )
368368 );
369369 $ this ->assertCount (0 , $ result );
@@ -402,13 +402,31 @@ public function testMapRawDataOnlyLatitude()
402402 $ result = $ this ->mapper ->mapRawData (
403403 array (
404404 \PHPExif \Mapper \ImageMagick::GPSLATITUDE => '40.333452381 ' ,
405- 'GPS :GPSLatitudeRef ' => 'North ' ,
405+ 'exif :GPSLatitudeRef ' => 'North ' ,
406406 )
407407 );
408408
409409 $ this ->assertCount (1 , $ result );
410410 }
411411
412+ /**
413+ * @group mapper
414+ * @covers \PHPExif\Mapper\ImageMagick::mapRawData
415+ */
416+ public function testMapRawDataCorrectlyIgnoresEmptyGPSData ()
417+ {
418+ $ result = $ this ->mapper ->mapRawData (
419+ array (
420+ \PHPExif \Mapper \ImageMagick::GPSLATITUDE => '0/0, 0/0, 0/0 ' ,
421+ 'exif:GPSLatitudeRef ' => '' ,
422+ \PHPExif \Mapper \ImageMagick::GPSLONGITUDE => '0/0, 0/0, 0/0 ' ,
423+ 'exif:GPSLongitudeRef ' => '' ,
424+ )
425+ );
426+
427+ $ this ->assertEquals (false , reset ($ result ));
428+ }
429+
412430
413431 public function testMapRawDataCorrectlyFormatsDifferentDateTimeString ()
414432 {
@@ -477,6 +495,21 @@ public function testMapRawDataCorrectlyNegativeAltitude()
477495 $ this ->assertEquals ($ expected , reset ($ result ));
478496 }
479497
498+ /**
499+ * @group mapper
500+ * @covers \PHPExif\Mapper\ImageMagick::mapRawData
501+ */
502+ public function testMapRawDataCorrectlyIgnoresIncorrectAltitude ()
503+ {
504+ $ result = $ this ->mapper ->mapRawData (
505+ array (
506+ \PHPExif \Mapper \ImageMagick::GPSALTITUDE => '0/0 ' ,
507+ 'exif:GPSAltitudeRef ' => '0 ' ,
508+ )
509+ );
510+ $ this ->assertEquals (false , reset ($ result ));
511+ }
512+
480513
481514 /**
482515 * @group mapper
0 commit comments