summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/media/XMPTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/includes/media/XMPTest.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/includes/media/XMPTest.php')
-rw-r--r--tests/phpunit/includes/media/XMPTest.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/phpunit/includes/media/XMPTest.php b/tests/phpunit/includes/media/XMPTest.php
index 86c722b1..d12e9b00 100644
--- a/tests/phpunit/includes/media/XMPTest.php
+++ b/tests/phpunit/includes/media/XMPTest.php
@@ -1,9 +1,13 @@
<?php
+
+/**
+ * @todo covers tags
+ */
class XMPTest extends MediaWikiTestCase {
protected function setUp() {
parent::setUp();
- if ( !wfDl( 'xml' ) ) {
+ if ( !extension_loaded( 'xml' ) ) {
$this->markTestSkipped( 'Requires libxml to do XMP parsing' );
}
}
@@ -15,6 +19,7 @@ class XMPTest extends MediaWikiTestCase {
* @param $expected Array expected result of parsing the xmp.
* @param $info String Short sentence on what's being tested.
*
+ * @throws Exception
* @dataProvider provideXMPParse
*/
public function testXMPParse( $xmp, $expected, $info ) {
@@ -62,9 +67,10 @@ class XMPTest extends MediaWikiTestCase {
// result array, but it seems kind of big to put directly in the test
// file.
$result = null;
- include( $xmpPath . $file[0] . '.result.php' );
+ include $xmpPath . $file[0] . '.result.php';
$data[] = array( $xmp, $result, '[' . $file[0] . '.xmp] ' . $file[1] );
}
+
return $data;
}
@@ -74,7 +80,7 @@ class XMPTest extends MediaWikiTestCase {
* @todo This is based on what the standard says. Need to find a real
* world example file to double check the support for this is right.
*/
- function testExtendedXMP() {
+ public function testExtendedXMP() {
$xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -104,7 +110,7 @@ class XMPTest extends MediaWikiTestCase {
* This test has an extended XMP block with a wrong guid (md5sum)
* and thus should only return the StandardXMP, not the ExtendedXMP.
*/
- function testExtendedXMPWithWrongGUID() {
+ public function testExtendedXMPWithWrongGUID() {
$xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -133,7 +139,7 @@ class XMPTest extends MediaWikiTestCase {
* Have a high offset to simulate a missing packet,
* which should cause it to ignore the ExtendedXMP packet.
*/
- function testExtendedXMPMissingPacket() {
+ public function testExtendedXMPMissingPacket() {
$xmpPath = __DIR__ . '/../../data/xmp/';
$standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
$extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -157,5 +163,4 @@ class XMPTest extends MediaWikiTestCase {
$this->assertEquals( $expected, $actual );
}
-
}