MediaWiki  master
FileBackendTest Class Reference

FileRepo FileBackend medium. More...

Inheritance diagram for FileBackendTest:
Collaboration diagram for FileBackendTest:

Public Member Functions

 assertBackendPathsConsistent (array $paths)
 
 assertGoodStatus (StatusValue $status, $msg)
 
 doTestGetLocalCopyAndReference404 ()
 
 tearDownFiles ()
 
 testAsyncWrites ()
 
 testConcatenate ( $op, $srcs, $srcsContent, $alreadyExists, $okStatus)
 provider_testConcatenate More...
 
 testCopy ( $op)
 provider_testCopy More...
 
 testCreate ( $op, $alreadyExists, $okStatus, $newSize)
 provider_testCreate More...
 
 testDelete ( $op, $withSource, $okStatus)
 provider_testDelete More...
 
 testDescribe ( $op, $withSource, $okStatus)
 provider_testDescribe More...
 
 testDoOperations ()
 
 testDoOperationsFailing ()
 
 testDoOperationsPipeline ()
 
 testDoQuickOperations ()
 
 testExtensionFromPath ( $path, $res)
 provider_testExtensionFromPath More...
 
 testGetContentType ( $mimeCallback, $mimeFromString)
 provider_testGetContentType More...
 
 testGetDirectoryList ()
 
 testGetFileContents ( $source, $content)
 provider_testGetFileContents More...
 
 testGetFileHttpUrl ( $source, $content)
 provider_testGetFileHttpUrl More...
 
 testGetFileList ()
 
 testGetFileStat ( $path, $content, $alreadyExists)
 provider_testGetFileStat More...
 
 testGetLocalCopy ( $source, $content)
 provider_testGetLocalCopy More...
 
 testGetLocalCopyAndReference404 ()
 
 testGetLocalReference ( $source, $content)
 provider_testGetLocalReference More...
 
 testIsStoragePath ( $path, $isStorePath)
 provider_testIsStoragePath More...
 
 testLockCalls ()
 
 testMove ( $op)
 provider_testMove More...
 
 testNormalizeStoragePath ( $path, $res)
 provider_normalizeStoragePath More...
 
 testParentStoragePath ( $path, $res)
 provider_testParentStoragePath More...
 
 testPrepareAndClean ( $path, $isOK)
 provider_testPrepareAndClean More...
 
 testReadAffinity ()
 
 testRecursiveClean ()
 
 testSanitizeOpHeaders ()
 
 testSplitStoragePath ( $path, $res)
 provider_testSplitStoragePath More...
 
 testStore ( $op)
 provider_testStore More...
 
 testStreamFile ( $path, $content, $alreadyExists)
 provider_testGetFileStat More...
 
 testStreamFileRange ()
 

Static Public Member Functions

static provider_normalizeStoragePath ()
 
static provider_testConcatenate ()
 
static provider_testCopy ()
 
static provider_testCreate ()
 provider_testCreate More...
 
static provider_testDelete ()
 
static provider_testDescribe ()
 
static provider_testExtensionFromPath ()
 
static provider_testGetContentType ()
 
static provider_testGetFileContents ()
 
static provider_testGetFileHttpUrl ()
 
static provider_testGetFileStat ()
 
static provider_testGetLocalCopy ()
 
static provider_testGetLocalReference ()
 
static provider_testIsStoragePath ()
 
static provider_testMove ()
 
static provider_testParentStoragePath ()
 
static provider_testPrepareAndClean ()
 
static provider_testSplitStoragePath ()
 
static provider_testStore ()
 
static provider_testStreamFile ()
 

Public Attributes

FSFileBackend $singleBackend
 

Protected Member Functions

 setUp ()
 

Private Member Functions

 assertHasHeaders (array $headers, array $attr)
 
 backendClass ()
 
 create (array $params)
 
 deleteFiles ( $container)
 
 doTestConcatenate ( $params, $srcs, $srcsContent, $alreadyExists, $okStatus)
 
 doTestCopy ( $op)
 
 doTestCreate ( $op, $alreadyExists, $okStatus, $newSize)
 
 doTestDelete ( $op, $withSource, $okStatus)
 
 doTestDescribe ( $op, $withSource, $okStatus)
 
 doTestDoOperations ()
 
 doTestDoOperationsFailing ()
 
 doTestDoOperationsPipeline ()
 
 doTestDoQuickOperations ()
 
 doTestGetDirectoryList ()
 
 doTestGetFileContents ( $source, $content)
 
 doTestGetFileHttpUrl ( $source, $content)
 
 doTestGetFileList ()
 
 doTestGetFileStat ( $path, $content, $alreadyExists)
 
 doTestGetLocalCopy ( $source, $content)
 
 doTestGetLocalReference ( $source, $content)
 
 doTestLockCalls ()
 
 doTestMove ( $op)
 
 doTestPrepareAndClean ( $path, $isOK)
 
 doTestRecursiveClean ()
 
 doTestStore ( $op)
 
 doTestStreamFile ( $path, $content)
 
 doTestStreamFileRange ()
 
 listToArray ( $iter)
 
 prepare (array $params)
 

Static Private Member Functions

static baseStorePath ()
 

Private Attributes

FileBackend $backend
 
FileBackendMultiWrite $multiBackend
 

Static Private Attributes

static $backendToUse
 

Detailed Description

Member Function Documentation

◆ assertBackendPathsConsistent()

FileBackendTest::assertBackendPathsConsistent ( array  $paths)

◆ assertGoodStatus()

◆ assertHasHeaders()

FileBackendTest::assertHasHeaders ( array  $headers,
array  $attr 
)
private

Definition at line 716 of file FileBackendTest.php.

References as.

Referenced by doTestDescribe().

◆ backendClass()

◆ baseStorePath()

static FileBackendTest::baseStorePath ( )
staticprivate

Definition at line 123 of file FileBackendTest.php.

◆ create()

FileBackendTest::create ( array  $params)
private

◆ deleteFiles()

FileBackendTest::deleteFiles (   $container)
private

Definition at line 2619 of file FileBackendTest.php.

References $base, $file, and as.

Referenced by tearDownFiles().

◆ doTestConcatenate()

FileBackendTest::doTestConcatenate (   $params,
  $srcs,
  $srcsContent,
  $alreadyExists,
  $okStatus 
)
private

Definition at line 971 of file FileBackendTest.php.

References $params, $source, as, assertGoodStatus(), backendClass(), and prepare().

Referenced by testConcatenate().

◆ doTestCopy()

FileBackendTest::doTestCopy (   $op)
private

◆ doTestCreate()

FileBackendTest::doTestCreate (   $op,
  $alreadyExists,
  $okStatus,
  $newSize 
)
private

Definition at line 767 of file FileBackendTest.php.

References assertBackendPathsConsistent(), assertGoodStatus(), backendClass(), and prepare().

Referenced by testCreate().

◆ doTestDelete()

FileBackendTest::doTestDelete (   $op,
  $withSource,
  $okStatus 
)
private

◆ doTestDescribe()

FileBackendTest::doTestDescribe (   $op,
  $withSource,
  $okStatus 
)
private

◆ doTestDoOperations()

FileBackendTest::doTestDoOperations ( )
private

Definition at line 1698 of file FileBackendTest.php.

References $base, assertGoodStatus(), create(), and prepare().

Referenced by testDoOperations().

◆ doTestDoOperationsFailing()

FileBackendTest::doTestDoOperationsFailing ( )
private

Definition at line 1881 of file FileBackendTest.php.

References $base, create(), and prepare().

Referenced by testDoOperationsFailing().

◆ doTestDoOperationsPipeline()

FileBackendTest::doTestDoOperationsPipeline ( )
private

◆ doTestDoQuickOperations()

FileBackendTest::doTestDoQuickOperations ( )
private

Definition at line 884 of file FileBackendTest.php.

References $base, $file, $path, as, assertGoodStatus(), backendClass(), and prepare().

Referenced by testDoQuickOperations().

◆ doTestGetDirectoryList()

FileBackendTest::doTestGetDirectoryList ( )
private

Definition at line 2130 of file FileBackendTest.php.

References $base, $file, as, assertGoodStatus(), backendClass(), listToArray(), and prepare().

Referenced by testGetDirectoryList().

◆ doTestGetFileContents()

FileBackendTest::doTestGetFileContents (   $source,
  $content 
)
private

Definition at line 1270 of file FileBackendTest.php.

References $content, $path, $source, as, assertGoodStatus(), backendClass(), and prepare().

Referenced by testGetFileContents().

◆ doTestGetFileHttpUrl()

FileBackendTest::doTestGetFileHttpUrl (   $source,
  $content 
)
private

Definition at line 1530 of file FileBackendTest.php.

References $content, $source, assertGoodStatus(), backendClass(), null, and prepare().

Referenced by testGetFileHttpUrl().

◆ doTestGetFileList()

FileBackendTest::doTestGetFileList ( )
private

Definition at line 1955 of file FileBackendTest.php.

References $base, $file, as, assertGoodStatus(), backendClass(), listToArray(), and prepare().

Referenced by testGetFileList().

◆ doTestGetFileStat()

FileBackendTest::doTestGetFileStat (   $path,
  $content,
  $alreadyExists 
)
private

◆ doTestGetLocalCopy()

FileBackendTest::doTestGetLocalCopy (   $source,
  $content 
)
private

Definition at line 1341 of file FileBackendTest.php.

References $content, $path, $source, as, assertGoodStatus(), backendClass(), and prepare().

Referenced by testGetLocalCopy().

◆ doTestGetLocalCopyAndReference404()

FileBackendTest::doTestGetLocalCopyAndReference404 ( )

Definition at line 1501 of file FileBackendTest.php.

References $base, backendClass(), and null.

Referenced by testGetLocalCopyAndReference404().

◆ doTestGetLocalReference()

FileBackendTest::doTestGetLocalReference (   $source,
  $content 
)
private

Definition at line 1426 of file FileBackendTest.php.

References $content, $path, $source, as, assertGoodStatus(), backendClass(), and prepare().

Referenced by testGetLocalReference().

◆ doTestLockCalls()

FileBackendTest::doTestLockCalls ( )
private

◆ doTestMove()

FileBackendTest::doTestMove (   $op)
private

◆ doTestPrepareAndClean()

FileBackendTest::doTestPrepareAndClean (   $path,
  $isOK 
)
private

Definition at line 1584 of file FileBackendTest.php.

References $path, assertGoodStatus(), backendClass(), and prepare().

Referenced by testPrepareAndClean().

◆ doTestRecursiveClean()

FileBackendTest::doTestRecursiveClean ( )
private

Definition at line 1642 of file FileBackendTest.php.

References $base, $dirs, as, assertGoodStatus(), backendClass(), and prepare().

Referenced by testRecursiveClean().

◆ doTestStore()

FileBackendTest::doTestStore (   $op)
private

◆ doTestStreamFile()

FileBackendTest::doTestStreamFile (   $path,
  $content 
)
private

Definition at line 1172 of file FileBackendTest.php.

References $content, $path, assertGoodStatus(), backendClass(), create(), null, and prepare().

Referenced by testStreamFile().

◆ doTestStreamFileRange()

FileBackendTest::doTestStreamFileRange ( )
private

Definition at line 1220 of file FileBackendTest.php.

References $base, $content, $path, as, assertGoodStatus(), backendClass(), create(), and prepare().

Referenced by testStreamFileRange().

◆ listToArray()

FileBackendTest::listToArray (   $iter)
private

Definition at line 2596 of file FileBackendTest.php.

Referenced by doTestGetDirectoryList(), and doTestGetFileList().

◆ prepare()

◆ provider_normalizeStoragePath()

static FileBackendTest::provider_normalizeStoragePath ( )
static

Definition at line 187 of file FileBackendTest.php.

References null.

◆ provider_testConcatenate()

static FileBackendTest::provider_testConcatenate ( )
static

Definition at line 1034 of file FileBackendTest.php.

References $content, and $params.

◆ provider_testCopy()

static FileBackendTest::provider_testCopy ( )
static

Definition at line 392 of file FileBackendTest.php.

References $source.

◆ provider_testCreate()

static FileBackendTest::provider_testCreate ( )
static

provider_testCreate

Definition at line 820 of file FileBackendTest.php.

◆ provider_testDelete()

static FileBackendTest::provider_testDelete ( )
static

Definition at line 616 of file FileBackendTest.php.

References $source.

◆ provider_testDescribe()

static FileBackendTest::provider_testDescribe ( )
static

Definition at line 730 of file FileBackendTest.php.

References $source.

◆ provider_testExtensionFromPath()

static FileBackendTest::provider_testExtensionFromPath ( )
static

Definition at line 237 of file FileBackendTest.php.

◆ provider_testGetContentType()

static FileBackendTest::provider_testGetContentType ( )
static

Definition at line 2462 of file FileBackendTest.php.

References false, null, FileBackendGroup\singleton(), and true.

◆ provider_testGetFileContents()

static FileBackendTest::provider_testGetFileContents ( )
static

Definition at line 1311 of file FileBackendTest.php.

References $base.

◆ provider_testGetFileHttpUrl()

static FileBackendTest::provider_testGetFileHttpUrl ( )
static

Definition at line 1549 of file FileBackendTest.php.

References $base.

◆ provider_testGetFileStat()

static FileBackendTest::provider_testGetFileStat ( )
static

Definition at line 1146 of file FileBackendTest.php.

References $base, false, null, and true.

◆ provider_testGetLocalCopy()

static FileBackendTest::provider_testGetLocalCopy ( )
static

Definition at line 1395 of file FileBackendTest.php.

References $base.

◆ provider_testGetLocalReference()

static FileBackendTest::provider_testGetLocalReference ( )
static

Definition at line 1473 of file FileBackendTest.php.

References $base.

◆ provider_testIsStoragePath()

static FileBackendTest::provider_testIsStoragePath ( )
static

Definition at line 139 of file FileBackendTest.php.

References false, and true.

◆ provider_testMove()

static FileBackendTest::provider_testMove ( )
static

Definition at line 513 of file FileBackendTest.php.

References $source.

◆ provider_testParentStoragePath()

static FileBackendTest::provider_testParentStoragePath ( )
static

Definition at line 216 of file FileBackendTest.php.

References null.

◆ provider_testPrepareAndClean()

static FileBackendTest::provider_testPrepareAndClean ( )
static

Definition at line 1573 of file FileBackendTest.php.

References $base, and true.

◆ provider_testSplitStoragePath()

static FileBackendTest::provider_testSplitStoragePath ( )
static

Definition at line 163 of file FileBackendTest.php.

References null.

◆ provider_testStore()

static FileBackendTest::provider_testStore ( )
static

Definition at line 301 of file FileBackendTest.php.

References TempFSFile\factory(), and wfTempDir().

◆ provider_testStreamFile()

static FileBackendTest::provider_testStreamFile ( )
static

Definition at line 1198 of file FileBackendTest.php.

References $base, and null.

◆ setUp()

FileBackendTest::setUp ( )
protected

◆ tearDownFiles()

◆ testAsyncWrites()

FileBackendTest::testAsyncWrites ( )

Definition at line 2519 of file FileBackendTest.php.

References class, DeferredUpdates\doUpdates(), and wfWikiID().

◆ testConcatenate()

FileBackendTest::testConcatenate (   $op,
  $srcs,
  $srcsContent,
  $alreadyExists,
  $okStatus 
)

provider_testConcatenate

Definition at line 959 of file FileBackendTest.php.

References $multiBackend, $singleBackend, doTestConcatenate(), and tearDownFiles().

◆ testCopy()

FileBackendTest::testCopy (   $op)

provider_testCopy

Definition at line 323 of file FileBackendTest.php.

References $multiBackend, $singleBackend, doTestCopy(), and tearDownFiles().

◆ testCreate()

FileBackendTest::testCreate (   $op,
  $alreadyExists,
  $okStatus,
  $newSize 
)

provider_testCreate

Definition at line 755 of file FileBackendTest.php.

References $multiBackend, $singleBackend, doTestCreate(), and tearDownFiles().

◆ testDelete()

FileBackendTest::testDelete (   $op,
  $withSource,
  $okStatus 
)

provider_testDelete

Definition at line 564 of file FileBackendTest.php.

References $multiBackend, $singleBackend, doTestDelete(), and tearDownFiles().

◆ testDescribe()

FileBackendTest::testDescribe (   $op,
  $withSource,
  $okStatus 
)

provider_testDescribe

Definition at line 655 of file FileBackendTest.php.

References $multiBackend, $singleBackend, doTestDescribe(), and tearDownFiles().

◆ testDoOperations()

FileBackendTest::testDoOperations ( )

◆ testDoOperationsFailing()

FileBackendTest::testDoOperationsFailing ( )

◆ testDoOperationsPipeline()

FileBackendTest::testDoOperationsPipeline ( )

◆ testDoQuickOperations()

FileBackendTest::testDoQuickOperations ( )

◆ testExtensionFromPath()

FileBackendTest::testExtensionFromPath (   $path,
  $res 
)

provider_testExtensionFromPath

Definition at line 232 of file FileBackendTest.php.

References $path, $res, and FileBackend\extensionFromPath().

◆ testGetContentType()

FileBackendTest::testGetContentType (   $mimeCallback,
  $mimeFromString 
)

provider_testGetContentType

Definition at line 2436 of file FileBackendTest.php.

References $IP, class, and null.

◆ testGetDirectoryList()

FileBackendTest::testGetDirectoryList ( )

◆ testGetFileContents()

FileBackendTest::testGetFileContents (   $source,
  $content 
)

provider_testGetFileContents

Definition at line 1258 of file FileBackendTest.php.

References $content, $multiBackend, $singleBackend, $source, doTestGetFileContents(), and tearDownFiles().

◆ testGetFileHttpUrl()

FileBackendTest::testGetFileHttpUrl (   $source,
  $content 
)

provider_testGetFileHttpUrl

Definition at line 1518 of file FileBackendTest.php.

References $content, $multiBackend, $singleBackend, $source, doTestGetFileHttpUrl(), and tearDownFiles().

◆ testGetFileList()

FileBackendTest::testGetFileList ( )

◆ testGetFileStat()

FileBackendTest::testGetFileStat (   $path,
  $content,
  $alreadyExists 
)

provider_testGetFileStat

Definition at line 1085 of file FileBackendTest.php.

References $content, $multiBackend, $path, $singleBackend, doTestGetFileStat(), and tearDownFiles().

◆ testGetLocalCopy()

FileBackendTest::testGetLocalCopy (   $source,
  $content 
)

provider_testGetLocalCopy

Definition at line 1329 of file FileBackendTest.php.

References $content, $multiBackend, $singleBackend, $source, doTestGetLocalCopy(), and tearDownFiles().

◆ testGetLocalCopyAndReference404()

FileBackendTest::testGetLocalCopyAndReference404 ( )

◆ testGetLocalReference()

FileBackendTest::testGetLocalReference (   $source,
  $content 
)

provider_testGetLocalReference

Definition at line 1414 of file FileBackendTest.php.

References $content, $multiBackend, $singleBackend, $source, doTestGetLocalReference(), and tearDownFiles().

◆ testIsStoragePath()

FileBackendTest::testIsStoragePath (   $path,
  $isStorePath 
)

provider_testIsStoragePath

Definition at line 134 of file FileBackendTest.php.

References $path, and FileBackend\isStoragePath().

◆ testLockCalls()

FileBackendTest::testLockCalls ( )

Definition at line 2331 of file FileBackendTest.php.

References $singleBackend, and doTestLockCalls().

◆ testMove()

FileBackendTest::testMove (   $op)

provider_testMove

Definition at line 443 of file FileBackendTest.php.

References $multiBackend, $singleBackend, doTestMove(), and tearDownFiles().

◆ testNormalizeStoragePath()

FileBackendTest::testNormalizeStoragePath (   $path,
  $res 
)

provider_normalizeStoragePath

Definition at line 182 of file FileBackendTest.php.

References $path, $res, and FileBackend\normalizeStoragePath().

◆ testParentStoragePath()

FileBackendTest::testParentStoragePath (   $path,
  $res 
)

provider_testParentStoragePath

Definition at line 211 of file FileBackendTest.php.

References $path, $res, and FileBackend\parentStoragePath().

◆ testPrepareAndClean()

FileBackendTest::testPrepareAndClean (   $path,
  $isOK 
)

provider_testPrepareAndClean

Definition at line 1563 of file FileBackendTest.php.

References $multiBackend, $path, $singleBackend, doTestPrepareAndClean(), and tearDownFiles().

◆ testReadAffinity()

FileBackendTest::testReadAffinity ( )

Definition at line 2469 of file FileBackendTest.php.

References class, and wfWikiID().

◆ testRecursiveClean()

FileBackendTest::testRecursiveClean ( )

◆ testSanitizeOpHeaders()

FileBackendTest::testSanitizeOpHeaders ( )

Definition at line 2566 of file FileBackendTest.php.

References $input, FileBackend\makeContentDisposition(), and wfWikiID().

◆ testSplitStoragePath()

FileBackendTest::testSplitStoragePath (   $path,
  $res 
)

provider_testSplitStoragePath

Definition at line 158 of file FileBackendTest.php.

References $path, $res, and FileBackend\splitStoragePath().

◆ testStore()

FileBackendTest::testStore (   $op)

provider_testStore

Definition at line 249 of file FileBackendTest.php.

References $multiBackend, $singleBackend, doTestStore(), and tearDownFiles().

◆ testStreamFile()

FileBackendTest::testStreamFile (   $path,
  $content,
  $alreadyExists 
)

provider_testGetFileStat

Definition at line 1160 of file FileBackendTest.php.

References $content, $multiBackend, $path, $singleBackend, doTestStreamFile(), and tearDownFiles().

◆ testStreamFileRange()

FileBackendTest::testStreamFileRange ( )

Member Data Documentation

◆ $backend

FileBackend FileBackendTest::$backend
private

Definition at line 52 of file FileBackendTest.php.

◆ $backendToUse

FileBackendTest::$backendToUse
staticprivate

Definition at line 57 of file FileBackendTest.php.

◆ $multiBackend

◆ $singleBackend


The documentation for this class was generated from the following file: