summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/media/XMPTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/media/XMPTest.php')
-rw-r--r--tests/phpunit/includes/media/XMPTest.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/phpunit/includes/media/XMPTest.php b/tests/phpunit/includes/media/XMPTest.php
index c952b23c..8198d3b0 100644
--- a/tests/phpunit/includes/media/XMPTest.php
+++ b/tests/phpunit/includes/media/XMPTest.php
@@ -22,11 +22,11 @@ class XMPTest extends MediaWikiTestCase {
}
$reader = new XMPReader;
$reader->parse( $xmp );
- $this->assertEquals( $expected, $reader->getResults(), $info );
+ $this->assertEquals( $expected, $reader->getResults(), $info, 0.0000000001 );
}
public function dataXMPParse() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/' ;
+ $xmpPath = __DIR__ . '/../../data/xmp/' ;
$data = array();
// $xmpFiles format: array of arrays with first arg file base name,
@@ -52,6 +52,7 @@ class XMPTest extends MediaWikiTestCase {
array( 'utf32BE', 'UTF-32BE encoding' ),
array( 'utf32LE', 'UTF-32LE encoding' ),
array( 'xmpExt', 'Extended XMP missing second part' ),
+ array( 'gps', 'Handling of exif GPS parameters in XMP' ),
);
foreach( $xmpFiles as $file ) {
$xmp = file_get_contents( $xmpPath . $file[0] . '.xmp' );
@@ -72,7 +73,7 @@ class XMPTest extends MediaWikiTestCase {
* world example file to double check the support for this is right.
*/
function testExtendedXMP() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -102,7 +103,7 @@ class XMPTest extends MediaWikiTestCase {
* and thus should only return the StandardXMP, not the ExtendedXMP.
*/
function testExtendedXMPWithWrongGUID() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -130,7 +131,7 @@ class XMPTest extends MediaWikiTestCase {
* which should cause it to ignore the ExtendedXMP packet.
*/
function testExtendedXMPMissingPacket() {
- $xmpPath = dirname( __FILE__ ) . '/../../data/xmp/';
+ $xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );