@covers tags for the rest of /media/* tests
[lhc/web/wiklou.git] / tests / phpunit / includes / media / XMPTest.php
index 3e39675..9ec5796 100644 (file)
@@ -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,7 +19,10 @@ 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
+        *
+        * @covers XMPReader::parse
         */
        public function testXMPParse( $xmp, $expected, $info ) {
                if ( !is_string( $xmp ) || !is_array( $expected ) ) {
@@ -62,7 +69,7 @@ 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] );
                }
 
@@ -74,8 +81,10 @@ 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.
+        *
+        * @covers XMPReader::parseExtended
         */
-       function testExtendedXMP() {
+       public function testExtendedXMP() {
                $xmpPath = __DIR__ . '/../../data/xmp/';
                $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
                $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -104,8 +113,10 @@ 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.
+        *
+        * @covers XMPReader::parseExtended
         */
-       function testExtendedXMPWithWrongGUID() {
+       public function testExtendedXMPWithWrongGUID() {
                $xmpPath = __DIR__ . '/../../data/xmp/';
                $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
                $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );
@@ -133,8 +144,10 @@ class XMPTest extends MediaWikiTestCase {
        /**
         * Have a high offset to simulate a missing packet,
         * which should cause it to ignore the ExtendedXMP packet.
+        *
+        * @covers XMPReader::parseExtended
         */
-       function testExtendedXMPMissingPacket() {
+       public function testExtendedXMPMissingPacket() {
                $xmpPath = __DIR__ . '/../../data/xmp/';
                $standardXMP = file_get_contents( $xmpPath . 'xmpExt.xmp' );
                $extendedXMP = file_get_contents( $xmpPath . 'xmpExt2.xmp' );