Skip to content

Commit cef8adb

Browse files
committed
Prepare version 2.9.1-alpha.2.
1 parent d651b25 commit cef8adb

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name" : "gomoob/php-metadata-extractor",
33
"description" : "PHP wrapper to easily call the Java metadata-extrator library.",
4-
"version" : "2.9.1-alpha.1",
4+
"version" : "2.9.1-alpha.2",
55
"license" : "MIT",
66
"type" : "library",
77
"keywords" : [

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gomoob-php-metadata-extractor",
3-
"version": "2.9.1-alpha.1",
3+
"version": "2.9.1-alpha.2",
44
"license": "MIT",
55
"repository" : {
66
"type" : "git",

src/main/php/Gomoob/MetadataExtractor/Metadata/Directory.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ abstract class Directory
5050
*/
5151
protected $tagMap = [];
5252

53+
/**
54+
* Indicates whether the specified tag type has been set.
55+
*
56+
* @param int tagType the tag type to check for.
57+
*
58+
* @return boolean true if a value exists for the specified tag type, false if not.
59+
*/
60+
public function containsTag($tagType)
61+
{
62+
return array_key_exists(intval($tagType), $this->tagMap);
63+
}
64+
5365
/**
5466
* Provides a description of a tag's value using the descriptor set by <code>setDescriptor(Descriptor)</code>.
5567
*

src/test/php/Gomoob/BinaryDriver/MetadataExtractorDriverTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,26 @@ public function testCreate()
5555
$this->assertContains('[Exif IFD0] Model = Canon EOS 70D', $output);
5656
$this->assertContains('[Exif IFD0] Exposure Time = 1/250 sec', $output);
5757
$this->assertContains('[Exif SubIFD] Exposure Time = 1/250 sec', $output);
58-
$this->assertContains('[Exif SubIFD] F-Number = f/8,0', $output);
58+
59+
// Under Windows and with French local floating numbers use ',' but under Unix its '.'
60+
$this->assertTrue(
61+
strstr($output, '[Exif SubIFD] F-Number = f/8,0') !== false ||
62+
strstr($output, '[Exif SubIFD] F-Number = f/8.0') !== false
63+
);
64+
5965
$this->assertContains('[Exif SubIFD] ISO Speed Ratings = null', $output);
6066
$this->assertContains('[Exif SubIFD] Date/Time Original = 2016:07:17 10:35:28', $output);
6167
$this->assertContains('[Exif SubIFD] Flash = null', $output);
6268
$this->assertContains('[Exif SubIFD] Focal Length = 51 mm', $output);
6369
$this->assertContains('[Exif SubIFD] Lens Model = EF-S17-55mm f/2.8 IS USM', $output);
6470
$this->assertContains('[File] File Name = elephant.jpg', $output);
65-
$this->assertContains('[File] File Size = 830001 bytes', $output);
71+
72+
// Under Windows the number of bytes computed is not the same as Unix
73+
$this->assertTrue(
74+
strstr($output, '[File] File Size = 829992 bytes') !== false ||
75+
strstr($output, '[File] File Size = 830001 bytes') !== false
76+
);
77+
6678
$this->assertContains('[File] File Modified Date = ', $output);
6779
}
6880

0 commit comments

Comments
 (0)