Skip to content

Commit

Permalink
Prepare version 2.9.1-alpha.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgaillard committed Aug 9, 2016
1 parent d651b25 commit cef8adb
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "gomoob/php-metadata-extractor",
"description" : "PHP wrapper to easily call the Java metadata-extrator library.",
"version" : "2.9.1-alpha.1",
"version" : "2.9.1-alpha.2",
"license" : "MIT",
"type" : "library",
"keywords" : [
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gomoob-php-metadata-extractor",
"version": "2.9.1-alpha.1",
"version": "2.9.1-alpha.2",
"license": "MIT",
"repository" : {
"type" : "git",
Expand Down
12 changes: 12 additions & 0 deletions src/main/php/Gomoob/MetadataExtractor/Metadata/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ abstract class Directory
*/
protected $tagMap = [];

/**
* Indicates whether the specified tag type has been set.
*
* @param int tagType the tag type to check for.
*
* @return boolean true if a value exists for the specified tag type, false if not.
*/
public function containsTag($tagType)
{
return array_key_exists(intval($tagType), $this->tagMap);
}

/**
* Provides a description of a tag's value using the descriptor set by <code>setDescriptor(Descriptor)</code>.
*
Expand Down
16 changes: 14 additions & 2 deletions src/test/php/Gomoob/BinaryDriver/MetadataExtractorDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,26 @@ public function testCreate()
$this->assertContains('[Exif IFD0] Model = Canon EOS 70D', $output);
$this->assertContains('[Exif IFD0] Exposure Time = 1/250 sec', $output);
$this->assertContains('[Exif SubIFD] Exposure Time = 1/250 sec', $output);
$this->assertContains('[Exif SubIFD] F-Number = f/8,0', $output);

// Under Windows and with French local floating numbers use ',' but under Unix its '.'
$this->assertTrue(
strstr($output, '[Exif SubIFD] F-Number = f/8,0') !== false ||
strstr($output, '[Exif SubIFD] F-Number = f/8.0') !== false
);

$this->assertContains('[Exif SubIFD] ISO Speed Ratings = null', $output);
$this->assertContains('[Exif SubIFD] Date/Time Original = 2016:07:17 10:35:28', $output);
$this->assertContains('[Exif SubIFD] Flash = null', $output);
$this->assertContains('[Exif SubIFD] Focal Length = 51 mm', $output);
$this->assertContains('[Exif SubIFD] Lens Model = EF-S17-55mm f/2.8 IS USM', $output);
$this->assertContains('[File] File Name = elephant.jpg', $output);
$this->assertContains('[File] File Size = 830001 bytes', $output);

// Under Windows the number of bytes computed is not the same as Unix
$this->assertTrue(
strstr($output, '[File] File Size = 829992 bytes') !== false ||
strstr($output, '[File] File Size = 830001 bytes') !== false
);

$this->assertContains('[File] File Modified Date = ', $output);
}

Expand Down

0 comments on commit cef8adb

Please sign in to comment.