Documentation

PathTest extends PHPUnit_Framework_TestCase
in package

Tags
since
1.0
author

Bernhard Schussek bschussek@gmail.com

author

Thomas Schulz mail@king2500.net

Table of Contents

$storedEnv  : mixed
provideAbsolutePathsWithDifferentRoots()  : mixed
provideCanonicalizationTests()  : mixed
provideChangeExtensionTests()  : mixed
provideGetDirectoryTests()  : mixed
provideGetExtensionTests()  : mixed
provideGetFilenameTests()  : mixed
provideGetFilenameWithoutExtensionTests()  : mixed
provideGetLongestCommonBasePathTests()  : mixed
provideGetRootTests()  : mixed
provideHasExtensionTests()  : mixed
provideIsAbsolutePathTests()  : mixed
provideIsBasePathTests()  : mixed
provideIsLocalTests()  : mixed
provideJoinTests()  : mixed
provideMakeAbsoluteTests()  : mixed
provideMakeRelativeTests()  : mixed
providePathTests()  : mixed
setUp()  : mixed
tearDown()  : mixed
testCanonicalize()  : mixed
testCanonicalizeFailsIfInvalidPath()  : mixed
testChangeExtension()  : mixed
testChangeExtensionFailsIfInvalidExtension()  : mixed
testChangeExtensionFailsIfInvalidPath()  : mixed
testGetDirectory()  : mixed
testGetDirectoryFailsIfInvalidPath()  : mixed
testGetExtension()  : mixed
testGetExtensionFailsIfInvalidPath()  : mixed
testGetFilename()  : mixed
testGetFilenameFailsIfInvalidPath()  : mixed
testGetFilenameWithoutExtension()  : mixed
testGetFilenameWithoutExtensionFailsIfInvalidExtension()  : mixed
testGetFilenameWithoutExtensionFailsIfInvalidPath()  : mixed
testGetHomeDirectoryFailsIfNotSupportedOperationSystem()  : mixed
testGetHomeDirectoryForUnix()  : mixed
testGetHomeDirectoryForWindows()  : mixed
testGetLongestCommonBasePath()  : mixed
testGetLongestCommonBasePathFailsIfInvalidPath()  : mixed
testGetRoot()  : mixed
testGetRootFailsIfInvalidPath()  : mixed
testHasExtension()  : mixed
testHasExtensionFailsIfInvalidExtension()  : mixed
testHasExtensionFailsIfInvalidPath()  : mixed
testIsAbsolute()  : mixed
testIsAbsoluteFailsIfInvalidPath()  : mixed
testIsBasePath()  : mixed
testIsBasePathFailsIfInvalidBasePath()  : mixed
testIsBasePathFailsIfInvalidPath()  : mixed
testIsLocal()  : mixed
testIsLocalFailsIfInvalidPath()  : mixed
testIsRelative()  : mixed
testIsRelativeFailsIfInvalidPath()  : mixed
testJoin()  : mixed
testJoinFailsIfInvalidPath()  : mixed
testJoinVarArgs()  : mixed
testMakeAbsolute()  : mixed
testMakeAbsoluteDoesNotFailIfDifferentRoot()  : mixed
testMakeAbsoluteFailsIfBasePathEmpty()  : mixed
testMakeAbsoluteFailsIfBasePathNotAbsolute()  : mixed
testMakeAbsoluteFailsIfBasePathNull()  : mixed
testMakeAbsoluteFailsIfInvalidBasePath()  : mixed
testMakeAbsoluteFailsIfInvalidPath()  : mixed
testMakeRelative()  : mixed
testMakeRelativeFailsIfAbsolutePathAndBasePathEmpty()  : mixed
testMakeRelativeFailsIfAbsolutePathAndBasePathNotAbsolute()  : mixed
testMakeRelativeFailsIfBasePathNull()  : mixed
testMakeRelativeFailsIfDifferentRoot()  : mixed
testMakeRelativeFailsIfInvalidBasePath()  : mixed
testMakeRelativeFailsIfInvalidPath()  : mixed
testNormalize()  : mixed
testNormalizeFailsIfNoString()  : mixed

Properties

$storedEnv

protected mixed $storedEnv = array()

Methods

provideAbsolutePathsWithDifferentRoots()

public provideAbsolutePathsWithDifferentRoots() : mixed
Return values
mixed

provideCanonicalizationTests()

public provideCanonicalizationTests() : mixed
Return values
mixed

provideChangeExtensionTests()

public provideChangeExtensionTests() : mixed
Return values
mixed

provideGetDirectoryTests()

public provideGetDirectoryTests() : mixed
Return values
mixed

provideGetExtensionTests()

public provideGetExtensionTests() : mixed
Return values
mixed

provideGetFilenameTests()

public provideGetFilenameTests() : mixed
Return values
mixed

provideGetFilenameWithoutExtensionTests()

public provideGetFilenameWithoutExtensionTests() : mixed
Return values
mixed

provideGetLongestCommonBasePathTests()

public provideGetLongestCommonBasePathTests() : mixed
Return values
mixed

provideGetRootTests()

public provideGetRootTests() : mixed
Return values
mixed

provideHasExtensionTests()

public provideHasExtensionTests() : mixed
Return values
mixed

provideIsAbsolutePathTests()

public provideIsAbsolutePathTests() : mixed
Return values
mixed

provideIsBasePathTests()

public provideIsBasePathTests() : mixed
Return values
mixed

provideIsLocalTests()

public provideIsLocalTests() : mixed
Return values
mixed

provideJoinTests()

public provideJoinTests() : mixed
Return values
mixed

provideMakeAbsoluteTests()

public provideMakeAbsoluteTests() : mixed
Return values
mixed

provideMakeRelativeTests()

public provideMakeRelativeTests() : mixed
Return values
mixed

providePathTests()

public providePathTests() : mixed
Return values
mixed

setUp()

public setUp() : mixed
Return values
mixed

tearDown()

public tearDown() : mixed
Return values
mixed

testCanonicalize()

public testCanonicalize(mixed $path, mixed $canonicalized) : mixed
Parameters
$path : mixed
$canonicalized : mixed
Tags
dataProvider

provideCanonicalizationTests

Return values
mixed

testCanonicalizeFailsIfInvalidPath()

public testCanonicalizeFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testChangeExtension()

public testChangeExtension(mixed $path, mixed $extension, mixed $pathExpected) : mixed
Parameters
$path : mixed
$extension : mixed
$pathExpected : mixed
Tags
dataProvider

provideChangeExtensionTests

Return values
mixed

testChangeExtensionFailsIfInvalidExtension()

public testChangeExtensionFailsIfInvalidExtension() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The extension must be a string. Got: array

Return values
mixed

testChangeExtensionFailsIfInvalidPath()

public testChangeExtensionFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testGetDirectory()

public testGetDirectory(mixed $path, mixed $directory) : mixed
Parameters
$path : mixed
$directory : mixed
Tags
dataProvider

provideGetDirectoryTests

Return values
mixed

testGetDirectoryFailsIfInvalidPath()

public testGetDirectoryFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testGetExtension()

public testGetExtension(mixed $path, mixed $forceLowerCase, mixed $extension) : mixed
Parameters
$path : mixed
$forceLowerCase : mixed
$extension : mixed
Tags
dataProvider

provideGetExtensionTests

Return values
mixed

testGetExtensionFailsIfInvalidPath()

public testGetExtensionFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testGetFilename()

public testGetFilename(mixed $path, mixed $filename) : mixed
Parameters
$path : mixed
$filename : mixed
Tags
dataProvider

provideGetFilenameTests

Return values
mixed

testGetFilenameFailsIfInvalidPath()

public testGetFilenameFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testGetFilenameWithoutExtension()

public testGetFilenameWithoutExtension(mixed $path, mixed $extension, mixed $filename) : mixed
Parameters
$path : mixed
$extension : mixed
$filename : mixed
Tags
dataProvider

provideGetFilenameWithoutExtensionTests

Return values
mixed

testGetFilenameWithoutExtensionFailsIfInvalidExtension()

public testGetFilenameWithoutExtensionFailsIfInvalidExtension() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The extension must be a string or null. Got: array

Return values
mixed

testGetFilenameWithoutExtensionFailsIfInvalidPath()

public testGetFilenameWithoutExtensionFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testGetHomeDirectoryFailsIfNotSupportedOperationSystem()

public testGetHomeDirectoryFailsIfNotSupportedOperationSystem() : mixed
Tags
expectedException

\RuntimeException

expectedExceptionMessage

Your environment or operation system isn't supported

Return values
mixed

testGetHomeDirectoryForUnix()

public testGetHomeDirectoryForUnix() : mixed
Return values
mixed

testGetHomeDirectoryForWindows()

public testGetHomeDirectoryForWindows() : mixed
Return values
mixed

testGetLongestCommonBasePath()

public testGetLongestCommonBasePath(array<string|int, mixed> $paths, mixed $basePath) : mixed
Parameters
$paths : array<string|int, mixed>
$basePath : mixed
Tags
dataProvider

provideGetLongestCommonBasePathTests

Return values
mixed

testGetLongestCommonBasePathFailsIfInvalidPath()

public testGetLongestCommonBasePathFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The paths must be strings. Got: array

Return values
mixed

testGetRoot()

public testGetRoot(mixed $path, mixed $root) : mixed
Parameters
$path : mixed
$root : mixed
Tags
dataProvider

provideGetRootTests

Return values
mixed

testGetRootFailsIfInvalidPath()

public testGetRootFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testHasExtension()

public testHasExtension(mixed $hasExtension, mixed $path, mixed $extension, mixed $ignoreCase) : mixed
Parameters
$hasExtension : mixed
$path : mixed
$extension : mixed
$ignoreCase : mixed
Tags
dataProvider

provideHasExtensionTests

Return values
mixed

testHasExtensionFailsIfInvalidExtension()

public testHasExtensionFailsIfInvalidExtension() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The extensions must be strings. Got: stdClass

Return values
mixed

testHasExtensionFailsIfInvalidPath()

public testHasExtensionFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testIsAbsolute()

public testIsAbsolute(mixed $path, mixed $isAbsolute) : mixed
Parameters
$path : mixed
$isAbsolute : mixed
Tags
dataProvider

provideIsAbsolutePathTests

Return values
mixed

testIsAbsoluteFailsIfInvalidPath()

public testIsAbsoluteFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testIsBasePath()

public testIsBasePath(mixed $path, mixed $ofPath, mixed $result) : mixed
Parameters
$path : mixed
$ofPath : mixed
$result : mixed
Tags
dataProvider

provideIsBasePathTests

Return values
mixed

testIsBasePathFailsIfInvalidBasePath()

public testIsBasePathFailsIfInvalidBasePath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The base path must be a string. Got: array

Return values
mixed

testIsBasePathFailsIfInvalidPath()

public testIsBasePathFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testIsLocal()

public testIsLocal(mixed $path, mixed $isLocal) : mixed
Parameters
$path : mixed
$isLocal : mixed
Tags
dataProvider

provideIsLocalTests

Return values
mixed

testIsLocalFailsIfInvalidPath()

public testIsLocalFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testIsRelative()

public testIsRelative(mixed $path, mixed $isAbsolute) : mixed
Parameters
$path : mixed
$isAbsolute : mixed
Tags
dataProvider

provideIsAbsolutePathTests

Return values
mixed

testIsRelativeFailsIfInvalidPath()

public testIsRelativeFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testJoin()

public testJoin(mixed $path1, mixed $path2, mixed $result) : mixed
Parameters
$path1 : mixed
$path2 : mixed
$result : mixed
Tags
dataProvider

provideJoinTests

Return values
mixed

testJoinFailsIfInvalidPath()

public testJoinFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The paths must be strings. Got: array

Return values
mixed

testJoinVarArgs()

public testJoinVarArgs() : mixed
Return values
mixed

testMakeAbsolute()

public testMakeAbsolute(mixed $relativePath, mixed $basePath, mixed $absolutePath) : mixed
Parameters
$relativePath : mixed
$basePath : mixed
$absolutePath : mixed
Tags
dataProvider

provideMakeAbsoluteTests

Return values
mixed

testMakeAbsoluteDoesNotFailIfDifferentRoot()

public testMakeAbsoluteDoesNotFailIfDifferentRoot(mixed $basePath, mixed $absolutePath) : mixed
Parameters
$basePath : mixed
$absolutePath : mixed
Tags
dataProvider

provideAbsolutePathsWithDifferentRoots

Return values
mixed

testMakeAbsoluteFailsIfBasePathEmpty()

public testMakeAbsoluteFailsIfBasePathEmpty() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The base path must be a non-empty string. Got: ""

Return values
mixed

testMakeAbsoluteFailsIfBasePathNotAbsolute()

public testMakeAbsoluteFailsIfBasePathNotAbsolute() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The base path "webmozart/puli" is not an absolute path.

Return values
mixed

testMakeAbsoluteFailsIfBasePathNull()

public testMakeAbsoluteFailsIfBasePathNull() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The base path must be a non-empty string. Got: NULL

Return values
mixed

testMakeAbsoluteFailsIfInvalidBasePath()

public testMakeAbsoluteFailsIfInvalidBasePath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The base path must be a non-empty string. Got: array

Return values
mixed

testMakeAbsoluteFailsIfInvalidPath()

public testMakeAbsoluteFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testMakeRelative()

public testMakeRelative(mixed $absolutePath, mixed $basePath, mixed $relativePath) : mixed
Parameters
$absolutePath : mixed
$basePath : mixed
$relativePath : mixed
Tags
dataProvider

provideMakeRelativeTests

Return values
mixed

testMakeRelativeFailsIfAbsolutePathAndBasePathEmpty()

public testMakeRelativeFailsIfAbsolutePathAndBasePathEmpty() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The absolute path "/webmozart/puli/css/style.css" cannot be made relative to the relative path "". You should provide an absolute base path instead.

Return values
mixed

testMakeRelativeFailsIfAbsolutePathAndBasePathNotAbsolute()

public testMakeRelativeFailsIfAbsolutePathAndBasePathNotAbsolute() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The absolute path "/webmozart/puli/css/style.css" cannot be made relative to the relative path "webmozart/puli". You should provide an absolute base path instead.

Return values
mixed

testMakeRelativeFailsIfBasePathNull()

public testMakeRelativeFailsIfBasePathNull() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The base path must be a string. Got: NULL

Return values
mixed

testMakeRelativeFailsIfDifferentRoot()

public testMakeRelativeFailsIfDifferentRoot(mixed $absolutePath, mixed $basePath) : mixed
Parameters
$absolutePath : mixed
$basePath : mixed
Tags
dataProvider

provideAbsolutePathsWithDifferentRoots

expectedException

\InvalidArgumentException

Return values
mixed

testMakeRelativeFailsIfInvalidBasePath()

public testMakeRelativeFailsIfInvalidBasePath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The base path must be a string. Got: array

Return values
mixed

testMakeRelativeFailsIfInvalidPath()

public testMakeRelativeFailsIfInvalidPath() : mixed
Tags
expectedException

\InvalidArgumentException

expectedExceptionMessage

The path must be a string. Got: array

Return values
mixed

testNormalize()

public testNormalize() : mixed
Return values
mixed

testNormalizeFailsIfNoString()

public testNormalizeFailsIfNoString() : mixed
Tags
expectedException

\InvalidArgumentException

Return values
mixed

Search results