Merge "thumb.php: Set ENT_NOQUOTES for htmlspecialchars"
[lhc/web/wiklou.git] / tests / phpunit / includes / filebackend / FileBackendTest.php
index c3d31d1..ddcf19b 100644 (file)
@@ -1,9 +1,49 @@
 <?php
 
+use Wikimedia\TestingAccessWrapper;
+
 /**
  * @group FileRepo
  * @group FileBackend
  * @group medium
+ *
+ * @covers FileBackend
+ *
+ * @covers CopyFileOp
+ * @covers CreateFileOp
+ * @covers DeleteFileOp
+ * @covers DescribeFileOp
+ * @covers FSFile
+ * @covers FSFileBackend
+ * @covers FSFileBackendDirList
+ * @covers FSFileBackendFileList
+ * @covers FSFileBackendList
+ * @covers FSFileOpHandle
+ * @covers FileBackendDBRepoWrapper
+ * @covers FileBackendError
+ * @covers FileBackendGroup
+ * @covers FileBackendMultiWrite
+ * @covers FileBackendStore
+ * @covers FileBackendStoreOpHandle
+ * @covers FileBackendStoreShardDirIterator
+ * @covers FileBackendStoreShardFileIterator
+ * @covers FileBackendStoreShardListIterator
+ * @covers FileJournal
+ * @covers FileOp
+ * @covers FileOpBatch
+ * @covers HTTPFileStreamer
+ * @covers LockManagerGroup
+ * @covers MemoryFileBackend
+ * @covers MoveFileOp
+ * @covers MySqlLockManager
+ * @covers NullFileJournal
+ * @covers NullFileOp
+ * @covers StoreFileOp
+ * @covers TempFSFile
+ *
+ * @covers FSLockManager
+ * @covers LockManager
+ * @covers NullLockManager
  */
 class FileBackendTest extends MediaWikiTestCase {
 
@@ -89,7 +129,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testIsStoragePath
-        * @covers FileBackend::isStoragePath
         */
        public function testIsStoragePath( $path, $isStorePath ) {
                $this->assertEquals( $isStorePath, FileBackend::isStoragePath( $path ),
@@ -114,7 +153,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testSplitStoragePath
-        * @covers FileBackend::splitStoragePath
         */
        public function testSplitStoragePath( $path, $res ) {
                $this->assertEquals( $res, FileBackend::splitStoragePath( $path ),
@@ -139,7 +177,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_normalizeStoragePath
-        * @covers FileBackend::normalizeStoragePath
         */
        public function testNormalizeStoragePath( $path, $res ) {
                $this->assertEquals( $res, FileBackend::normalizeStoragePath( $path ),
@@ -169,7 +206,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testParentStoragePath
-        * @covers FileBackend::parentStoragePath
         */
        public function testParentStoragePath( $path, $res ) {
                $this->assertEquals( $res, FileBackend::parentStoragePath( $path ),
@@ -191,7 +227,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testExtensionFromPath
-        * @covers FileBackend::extensionFromPath
         */
        public function testExtensionFromPath( $path, $res ) {
                $this->assertEquals( $res, FileBackend::extensionFromPath( $path ),
@@ -224,9 +259,6 @@ class FileBackendTest extends MediaWikiTestCase {
                $this->tearDownFiles();
        }
 
-       /**
-        * @covers FileBackend::doOperation
-        */
        private function doTestStore( $op ) {
                $backendName = $this->backendClass();
 
@@ -286,7 +318,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testCopy
-        * @covers FileBackend::doOperation
         */
        public function testCopy( $op ) {
                $this->backend = $this->singleBackend;
@@ -407,7 +438,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testMove
-        * @covers FileBackend::doOperation
         */
        public function testMove( $op ) {
                $this->backend = $this->singleBackend;
@@ -529,7 +559,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testDelete
-        * @covers FileBackend::doOperation
         */
        public function testDelete( $op, $withSource, $okStatus ) {
                $this->backend = $this->singleBackend;
@@ -621,7 +650,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testDescribe
-        * @covers FileBackend::doOperation
         */
        public function testDescribe( $op, $withSource, $okStatus ) {
                $this->backend = $this->singleBackend;
@@ -722,7 +750,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testCreate
-        * @covers FileBackend::doOperation
         */
        public function testCreate( $op, $alreadyExists, $okStatus, $newSize ) {
                $this->backend = $this->singleBackend;
@@ -843,9 +870,6 @@ class FileBackendTest extends MediaWikiTestCase {
                return $cases;
        }
 
-       /**
-        * @covers FileBackend::doQuickOperations
-        */
        public function testDoQuickOperations() {
                $this->backend = $this->singleBackend;
                $this->doTestDoQuickOperations();
@@ -1056,7 +1080,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testGetFileStat
-        * @covers FileBackend::getFileStat
         */
        public function testGetFileStat( $path, $content, $alreadyExists ) {
                $this->backend = $this->singleBackend;
@@ -1132,7 +1155,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testGetFileStat
-        * @covers FileBackend::streamFile
         */
        public function testStreamFile( $path, $content, $alreadyExists ) {
                $this->backend = $this->singleBackend;
@@ -1231,8 +1253,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testGetFileContents
-        * @covers FileBackend::getFileContents
-        * @covers FileBackend::getFileContentsMulti
         */
        public function testGetFileContents( $source, $content ) {
                $this->backend = $this->singleBackend;
@@ -1304,7 +1324,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testGetLocalCopy
-        * @covers FileBackend::getLocalCopy
         */
        public function testGetLocalCopy( $source, $content ) {
                $this->backend = $this->singleBackend;
@@ -1390,7 +1409,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testGetLocalReference
-        * @covers FileBackend::getLocalReference
         */
        public function testGetLocalReference( $source, $content ) {
                $this->backend = $this->singleBackend;
@@ -1467,10 +1485,6 @@ class FileBackendTest extends MediaWikiTestCase {
                return $cases;
        }
 
-       /**
-        * @covers FileBackend::getLocalCopy
-        * @covers FileBackend::getLocalReference
-        */
        public function testGetLocalCopyAndReference404() {
                $this->backend = $this->singleBackend;
                $this->tearDownFiles();
@@ -1499,7 +1513,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testGetFileHttpUrl
-        * @covers FileBackend::getFileHttpUrl
         */
        public function testGetFileHttpUrl( $source, $content ) {
                $this->backend = $this->singleBackend;
@@ -1544,8 +1557,6 @@ class FileBackendTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provider_testPrepareAndClean
-        * @covers FileBackend::prepare
-        * @covers FileBackend::clean
         */
        public function testPrepareAndClean( $path, $isOK ) {
                $this->backend = $this->singleBackend;
@@ -1626,9 +1637,6 @@ class FileBackendTest extends MediaWikiTestCase {
                $this->tearDownFiles();
        }
 
-       /**
-        * @covers FileBackend::clean
-        */
        private function doTestRecursiveClean() {
                $backendName = $this->backendClass();
 
@@ -1673,9 +1681,6 @@ class FileBackendTest extends MediaWikiTestCase {
                }
        }
 
-       /**
-        * @covers FileBackend::doOperations
-        */
        public function testDoOperations() {
                $this->backend = $this->singleBackend;
                $this->tearDownFiles();
@@ -1763,9 +1768,6 @@ class FileBackendTest extends MediaWikiTestCase {
                        "Correct file SHA-1 of $fileC" );
        }
 
-       /**
-        * @covers FileBackend::doOperations
-        */
        public function testDoOperationsPipeline() {
                $this->backend = $this->singleBackend;
                $this->tearDownFiles();
@@ -1862,9 +1864,6 @@ class FileBackendTest extends MediaWikiTestCase {
                        "Correct file SHA-1 of $fileC" );
        }
 
-       /**
-        * @covers FileBackend::doOperations
-        */
        public function testDoOperationsFailing() {
                $this->backend = $this->singleBackend;
                $this->tearDownFiles();
@@ -1939,9 +1938,6 @@ class FileBackendTest extends MediaWikiTestCase {
                        "Correct file SHA-1 of $fileA" );
        }
 
-       /**
-        * @covers FileBackend::getFileList
-        */
        public function testGetFileList() {
                $this->backend = $this->singleBackend;
                $this->tearDownFiles();
@@ -2117,10 +2113,6 @@ class FileBackendTest extends MediaWikiTestCase {
                }
        }
 
-       /**
-        * @covers FileBackend::getTopDirectoryList
-        * @covers FileBackend::getDirectoryList
-        */
        public function testGetDirectoryList() {
                $this->backend = $this->singleBackend;
                $this->tearDownFiles();
@@ -2334,10 +2326,6 @@ class FileBackendTest extends MediaWikiTestCase {
                $this->assertEquals( [], $items, "Directory listing is empty." );
        }
 
-       /**
-        * @covers FileBackend::lockFiles
-        * @covers FileBackend::unlockFiles
-        */
        public function testLockCalls() {
                $this->backend = $this->singleBackend;
                $this->doTestLockCalls();