VuFind API Documentation

YamlReaderTest extends TestCase
in package
Uses FixtureTrait, PathResolverTrait

Config YamlReader Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

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

testCacheForcedReload()  : void
Test that we can force a reload from cache.
testCacheRead()  : void
Test that the cache can short-circuit data loading.
testCacheWrite()  : void
Test that the cache is updated as expected.
testParentConfig()  : void
Test @parent_yaml and @merged_sections directives
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

Methods

testCacheForcedReload()

Test that we can force a reload from cache.

public testCacheForcedReload() : void
Return values
void

testCacheRead()

Test that the cache can short-circuit data loading.

public testCacheRead() : void
Return values
void

testCacheWrite()

Test that the cache is updated as expected.

public testCacheWrite() : void
Return values
void

testParentConfig()

Test @parent_yaml and @merged_sections directives

public testParentConfig() : void
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