summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/media/ExifTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /tests/phpunit/includes/media/ExifTest.php
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'tests/phpunit/includes/media/ExifTest.php')
-rw-r--r--tests/phpunit/includes/media/ExifTest.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/phpunit/includes/media/ExifTest.php b/tests/phpunit/includes/media/ExifTest.php
deleted file mode 100644
index 045777d7..00000000
--- a/tests/phpunit/includes/media/ExifTest.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-class ExifTest extends MediaWikiTestCase {
-
- public function setUp() {
- $this->mediaPath = __DIR__ . '/../../data/media/';
-
- if ( !wfDl( 'exif' ) ) {
- $this->markTestSkipped( "This test needs the exif extension." );
- }
- global $wgShowEXIF;
- $this->showExif = $wgShowEXIF;
- $wgShowEXIF = true;
- }
-
- public function tearDown() {
- global $wgShowEXIF;
- $wgShowEXIF = $this->showExif;
- }
-
- public function testGPSExtraction() {
- $filename = $this->mediaPath . 'exif-gps.jpg';
- $seg = JpegMetadataExtractor::segmentSplitter( $filename );
- $exif = new Exif( $filename, $seg['byteOrder'] );
- $data = $exif->getFilteredData();
- $expected = array(
- 'GPSLatitude' => 88.5180555556,
- 'GPSLongitude' => -21.12357,
- 'GPSAltitude' => -3.141592653,
- 'GPSDOP' => '5/1',
- 'GPSVersionID' => '2.2.0.0',
- );
- $this->assertEquals( $expected, $data, '', 0.0000000001 );
- }
-
- public function testUnicodeUserComment() {
- $filename = $this->mediaPath . 'exif-user-comment.jpg';
- $seg = JpegMetadataExtractor::segmentSplitter( $filename );
- $exif = new Exif( $filename, $seg['byteOrder'] );
- $data = $exif->getFilteredData();
-
- $expected = array(
- 'UserComment' => 'test⁔comment'
- );
- $this->assertEquals( $expected, $data );
- }
-
-
-}