VuFind API Documentation

PathResolverTest extends TestCase
in package
Uses FixtureTrait, PathResolverTrait

Config Path Resolver Test Class

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$stackedResolver  : PathResolver
Stacked path resolver
getStackedFixtureDir()  : string
Get path to stacked config fixtures
getTestPathStackData()  : array<string|int, mixed>
Data provider for testPathStack
setUp()  : void
Setup method.
testPathResolver()  : void
Test PathResolver
testPathStack()  : void
Test stacked path resolution
addPathResolverToContainer()  : void
Add PathResolverFactory to a mock container
getFixture()  : string
Load a fixture file.
getFixtureDir()  : string
Get the base directory containing fixtures.
getFixturePath()  : string
Resolve fixture path.
getJsonFixture()  : array<string|int, mixed>
Load a JSON fixture from file (using associative array return type).
getPathResolver()  : PathResolver
Get a config file path resolver

Properties

Methods

getStackedFixtureDir()

Get path to stacked config fixtures

public getStackedFixtureDir() : string
Return values
string

getTestPathStackData()

Data provider for testPathStack

public static getTestPathStackData() : array<string|int, mixed>
Return values
array<string|int, mixed>

testPathResolver()

Test PathResolver

public testPathResolver() : void
Return values
void

testPathStack()

Test stacked path resolution

public testPathStack(string $filename, string $expectedFilePath[, string|null $expectedBasePath = null ]) : void
Parameters
$filename : string

Filename to check

$expectedFilePath : string

Expected result (minus base path)

$expectedBasePath : string|null = null

Expected base path in result (null = use default fixture path)

Tags
dataProvider

getTestPathStackData

Return values
void

addPathResolverToContainer()

Add PathResolverFactory to a mock container

protected addPathResolverToContainer(MockContainer $container) : void
Parameters
$container : MockContainer

Mock Container

Return values
void

getFixture()

Load a fixture file.

protected getFixture(string $filename[, string $module = 'VuFind' ]) : string
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Tags
throws
RuntimeException
Return values
string

getFixtureDir()

Get the base directory containing fixtures.

protected getFixtureDir([string $module = 'VuFind' ]) : string
Parameters
$module : string = 'VuFind'

Module containing fixture.

Return values
string

getFixturePath()

Resolve fixture path.

protected getFixturePath(string $filename[, string $module = 'VuFind' ]) : string
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Tags
throws
RuntimeException
Return values
string

getJsonFixture()

Load a JSON fixture from file (using associative array return type).

protected getJsonFixture(string $filename[, string $module = 'VuFind' ]) : array<string|int, mixed>
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Return values
array<string|int, mixed>

getPathResolver()

Get a config file path resolver

protected getPathResolver([string|null $baseDirectory = null ]) : PathResolver
Parameters
$baseDirectory : string|null = null

Optional directory to override APPLICATION_PATH

Return values
PathResolver

Search results