Documentation

ZipStreamTest extends TestCase
in package
uses Util, Assertions, Tempfile

Table of Contents

Properties

$tempfile  : string|null
$tempfileStream  : resource

Methods

testAddEmptyDirectory()  : void
testAddFile()  : void
testAddFileCallbackLax()  : void
testAddFileCallbackStrict()  : void
testAddFileFromPath()  : void
testAddFileFromPathFileNotFoundException()  : void
testAddFileFromPathFileNotReadableException()  : void
testAddFileFromPathWithStorageMethod()  : void
testAddFileFromPsr7Stream()  : void
testAddFileFromPsr7StreamWithFileSizeSet()  : void
testAddFileFromPsr7StreamWithOutputToPsr7Stream()  : void
testAddFileFromStream()  : void
testAddFileFromStreamBrokenInputRewind()  : void
testAddFileFromStreamBrokenOutputWrite()  : void
testAddFileFromStreamUnreadableInput()  : void
testAddFileFromStreamUnseekableInputWithoutZeroHeader()  : void
testAddFileFromStreamUnseekableInputWithZeroHeader()  : void
testAddFileFromStreamWithStorageMethod()  : void
testAddFileSimulate()  : void
testAddFileSimulateStrictInitial()  : void
testAddFileSimulateStrictZero()  : void
testAddFileSimulateWithExactSizeInitial()  : void
testAddFileSimulateWithExactSizeZero()  : void
testAddFileSimulateWithFstat()  : void
testAddFileSimulateWithMaxSize()  : void
testAddFileSimulateWithWrongExactSize()  : void
testAddFileSimulateWithZeroSizeInFstat()  : void
testAddFileUtf8NameComment()  : void
testAddFileUtf8NameNonUtfComment()  : void
testAddFileWithStorageMethod()  : void
testAddLargeFileFromPath()  : void
testAddLargeFileFromPsr7Stream()  : void
testAddLargeFileWithoutZip64WithoutZeroHeader()  : void
testAddLargeFileWithoutZip64WithZeroHeader()  : void
testAddsZip64HeaderWhenNeeded()  : void
testContinueFinishedZip()  : void
testCreateArchiveHeaders()  : void
testCreateArchiveWithFlushOptionSet()  : void
testCreateArchiveWithOutputBufferingOffAndFlushOptionSet()  : void
testDoesNotAddZip64HeaderWhenNotNeeded()  : void
testExecuteSimulation()  : void
testExecuteSimulationBeforeFinish()  : void
testLongZipWith64()  : void
testLongZipWithout64()  : void
testManyFilesWithoutZip64()  : void
testManyFilesWithZip64()  : void
testSimulationWithLargeZip64AndZeroHeader()  : void
assertFileContains()  : void
assertFileDoesNotContain()  : void
cmdExists()  : bool
dumpZipContents()  : string
getRecursiveFileList()  : array<string|int, string>
getTmpDir()  : string
getTmpFileStream()  : array<string|int, mixed>
setUp()  : void
tearDown()  : void
validateAndExtractZip()  : string
zipArchiveOpenErrorCodeName()  : string
addLargeFileFileFromPath()  : void

Properties

$tempfile

protected string|null $tempfile

$tempfileStream

protected resource $tempfileStream

Methods

testAddEmptyDirectory()

public testAddEmptyDirectory() : void

testAddFileCallbackLax()

public testAddFileCallbackLax() : void

testAddFileCallbackStrict()

public testAddFileCallbackStrict() : void

testAddFileFromPathFileNotFoundException()

public testAddFileFromPathFileNotFoundException() : void

testAddFileFromPathFileNotReadableException()

public testAddFileFromPathFileNotReadableException() : void

testAddFileFromPathWithStorageMethod()

public testAddFileFromPathWithStorageMethod() : void

testAddFileFromPsr7Stream()

public testAddFileFromPsr7Stream() : void

testAddFileFromPsr7StreamWithFileSizeSet()

public testAddFileFromPsr7StreamWithFileSizeSet() : void

testAddFileFromPsr7StreamWithOutputToPsr7Stream()

public testAddFileFromPsr7StreamWithOutputToPsr7Stream() : void

testAddFileFromStream()

public testAddFileFromStream() : void

testAddFileFromStreamBrokenInputRewind()

public testAddFileFromStreamBrokenInputRewind() : void

testAddFileFromStreamBrokenOutputWrite()

public testAddFileFromStreamBrokenOutputWrite() : void

testAddFileFromStreamUnreadableInput()

public testAddFileFromStreamUnreadableInput() : void

testAddFileFromStreamUnseekableInputWithoutZeroHeader()

public testAddFileFromStreamUnseekableInputWithoutZeroHeader() : void

testAddFileFromStreamUnseekableInputWithZeroHeader()

public testAddFileFromStreamUnseekableInputWithZeroHeader() : void

testAddFileFromStreamWithStorageMethod()

public testAddFileFromStreamWithStorageMethod() : void

testAddFileSimulateStrictInitial()

public testAddFileSimulateStrictInitial() : void

testAddFileSimulateStrictZero()

public testAddFileSimulateStrictZero() : void

testAddFileSimulateWithExactSizeInitial()

public testAddFileSimulateWithExactSizeInitial() : void

testAddFileSimulateWithExactSizeZero()

public testAddFileSimulateWithExactSizeZero() : void

testAddFileSimulateWithFstat()

public testAddFileSimulateWithFstat() : void

testAddFileSimulateWithMaxSize()

public testAddFileSimulateWithMaxSize() : void

testAddFileSimulateWithWrongExactSize()

public testAddFileSimulateWithWrongExactSize() : void

testAddFileSimulateWithZeroSizeInFstat()

public testAddFileSimulateWithZeroSizeInFstat() : void

testAddFileUtf8NameComment()

public testAddFileUtf8NameComment() : void

testAddFileUtf8NameNonUtfComment()

public testAddFileUtf8NameNonUtfComment() : void

testAddFileWithStorageMethod()

public testAddFileWithStorageMethod() : void

testAddLargeFileFromPath()

public testAddLargeFileFromPath() : void

testAddLargeFileFromPsr7Stream()

public testAddLargeFileFromPsr7Stream() : void
Attributes
#[Group]
'slow'

testAddLargeFileWithoutZip64WithoutZeroHeader()

public testAddLargeFileWithoutZip64WithoutZeroHeader() : void
Attributes
#[Group]
'slow'

testAddLargeFileWithoutZip64WithZeroHeader()

public testAddLargeFileWithoutZip64WithZeroHeader() : void
Attributes
#[Group]
'slow'

testAddsZip64HeaderWhenNeeded()

public testAddsZip64HeaderWhenNeeded() : void
Attributes
#[Group]
'slow'

testContinueFinishedZip()

public testContinueFinishedZip() : void

testCreateArchiveHeaders()

public testCreateArchiveHeaders() : void

testCreateArchiveWithFlushOptionSet()

public testCreateArchiveWithFlushOptionSet() : void

testCreateArchiveWithOutputBufferingOffAndFlushOptionSet()

public testCreateArchiveWithOutputBufferingOffAndFlushOptionSet() : void

testDoesNotAddZip64HeaderWhenNotNeeded()

public testDoesNotAddZip64HeaderWhenNotNeeded() : void
Attributes
#[Group]
'slow'

testExecuteSimulation()

public testExecuteSimulation() : void

testExecuteSimulationBeforeFinish()

public testExecuteSimulationBeforeFinish() : void

testLongZipWith64()

public testLongZipWith64() : void
Attributes
#[Group]
'slow'

testLongZipWithout64()

public testLongZipWithout64() : void
Attributes
#[Group]
'slow'

testManyFilesWithoutZip64()

public testManyFilesWithoutZip64() : void
Attributes
#[Group]
'slow'

testManyFilesWithZip64()

public testManyFilesWithZip64() : void
Attributes
#[Group]
'slow'

testSimulationWithLargeZip64AndZeroHeader()

public testSimulationWithLargeZip64AndZeroHeader() : void
Attributes
#[Group]
'slow'

assertFileContains()

protected assertFileContains(string $filePath, string $needle) : void
Parameters
$filePath : string
$needle : string

assertFileDoesNotContain()

protected assertFileDoesNotContain(string $filePath, string $needle) : void
Parameters
$filePath : string
$needle : string

cmdExists()

protected cmdExists(string $command) : bool
Parameters
$command : string
Return values
bool

dumpZipContents()

protected dumpZipContents(string $path) : string
Parameters
$path : string
Return values
string

getRecursiveFileList()

protected getRecursiveFileList(string $path[, bool $includeDirectories = false ]) : array<string|int, string>
Parameters
$path : string
$includeDirectories : bool = false
Return values
array<string|int, string>

getTmpDir()

protected getTmpDir() : string
Return values
string

getTmpFileStream()

protected getTmpFileStream() : array<string|int, mixed>
Return values
array<string|int, mixed>

validateAndExtractZip()

protected validateAndExtractZip(string $zipPath) : string
Parameters
$zipPath : string
Return values
string

zipArchiveOpenErrorCodeName()

protected zipArchiveOpenErrorCodeName(int $code) : string
Parameters
$code : int
Return values
string

        
On this page

Search results