Skip to content

Commit 0ce7a9f

Browse files
committed
Add unit test
1 parent 609f8c8 commit 0ce7a9f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/PHPExif/Mapper/NativeMapperTest.php

+15
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,21 @@ public function testMapRawDataCorrectlyFormatsFocalLength()
138138
$this->assertEquals(6, reset($mapped));
139139
}
140140

141+
/**
142+
* @group mapper
143+
* @covers \PHPExif\Mapper\Native::mapRawData
144+
*/
145+
public function testMapRawDataCorrectlyFormatsFocalLengthDivisionByZero()
146+
{
147+
$rawData = array(
148+
\PHPExif\Mapper\Native::FOCALLENGTH => '1/0',
149+
);
150+
151+
$mapped = $this->mapper->mapRawData($rawData);
152+
153+
$this->assertEquals(0, reset($mapped));
154+
}
155+
141156
/**
142157
* @group mapper
143158
* @covers \PHPExif\Mapper\Native::mapRawData

0 commit comments

Comments
 (0)