Add @covers tags to utils tests
[lhc/web/wiklou.git] / tests / phpunit / includes / utils / FileContentsHasherTest.php
index a03e1fc..0ee4c13 100644 (file)
@@ -3,27 +3,27 @@
 /**
  * @covers FileContentsHasherTest
  */
-class FileContentsHasherTest extends MediaWikiTestCase {
+class FileContentsHasherTest extends PHPUnit_Framework_TestCase {
 
        public function provideSingleFile() {
                return array_map( function ( $file ) {
-                       return array( $file, file_get_contents( $file ) );
+                       return [ $file, file_get_contents( $file ) ];
                }, glob( __DIR__ . '/../../data/filecontentshasher/*.*' ) );
        }
 
        public function provideMultipleFiles() {
-               return array(
-                       array( $this->provideSingleFile() )
-               );
+               return [
+                       [ $this->provideSingleFile() ]
+               ];
        }
 
        /**
-        * @covers FileContentsHasher::getFileContentHash
+        * @covers FileContentsHasher::getFileContentsHash
         * @covers FileContentsHasher::getFileContentsHashInternal
         * @dataProvider provideSingleFile
         */
        public function testSingleFileHash( $fileName, $contents ) {
-               foreach ( array( 'md4', 'md5' ) as $algo ) {
+               foreach ( [ 'md4', 'md5' ] as $algo ) {
                        $expectedHash = hash( $algo, $contents );
                        $actualHash = FileContentsHasher::getFileContentsHash( $fileName, $algo );
                        $this->assertEquals( $expectedHash, $actualHash );
@@ -33,13 +33,13 @@ class FileContentsHasherTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers FileContentsHasher::getFileContentHash
+        * @covers FileContentsHasher::getFileContentsHash
         * @covers FileContentsHasher::getFileContentsHashInternal
         * @dataProvider provideMultipleFiles
         */
        public function testMultipleFileHash( $files ) {
-               $fileNames = array();
-               $hashes = array();
+               $fileNames = [];
+               $hashes = [];
                foreach ( $files as $fileInfo ) {
                        list( $fileName, $contents ) = $fileInfo;
                        $fileNames[] = $fileName;