VuFind API Documentation

BookplateTest extends TestCase
in package
Uses ConfigPluginManagerTrait

Bookplate Related Items Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Table of Contents

testBookplateWithDefaultConfigLocation()  : void
Test bookplate display with default config location, title display on, and single-valued index fields.
testBookplateWithNonDefaultConfigLocation()  : void
Test bookplate display with non-default config location, title display off, and multi-valued index fields.
testDefaultsWithNoConfig()  : void
Test default behavior (no bookplates)
getBookplate()  : Bookplate
Get the test subject.
getContainer()  : MockContainer
Get the mock container.
getMockConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager with the given configuration "files" available.
getMockFailingConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager that will throw an exception.
getTestRecord()  : TestHarness
Get a record driver to test with.

Methods

testBookplateWithDefaultConfigLocation()

Test bookplate display with default config location, title display on, and single-valued index fields.

public testBookplateWithDefaultConfigLocation() : void
Return values
void

testBookplateWithNonDefaultConfigLocation()

Test bookplate display with non-default config location, title display off, and multi-valued index fields.

public testBookplateWithNonDefaultConfigLocation() : void
Return values
void

testDefaultsWithNoConfig()

Test default behavior (no bookplates)

public testDefaultsWithNoConfig() : void
Return values
void

getContainer()

Get the mock container.

protected getContainer([string $expectedConfig = 'config' ][, array<string|int, mixed> $config = [] ]) : MockContainer
Parameters
$expectedConfig : string = 'config'

Name of config that will be used

$config : array<string|int, mixed> = []

Config to return

Return values
MockContainer

getMockConfigPluginManager()

Get a mock configuration plugin manager with the given configuration "files" available.

protected getMockConfigPluginManager(array<string|int, mixed> $configs[, array<string|int, mixed> $default = [] ][, InvocationOrder|null $getExpect = null ][, InvocationOrder|null $hasExpect = null ]) : MockObject|PluginManager
Parameters
$configs : array<string|int, mixed>

An associative array of configurations where key is the file (e.g. 'config') and value an array of configuration sections and directives

$default : array<string|int, mixed> = []

Default configuration to return when no entry is found in $configs

$getExpect : InvocationOrder|null = null

The expected invocation order for the get() method (null for any)

$hasExpect : InvocationOrder|null = null

The expected invocation order for the has() method (null for any)

Return values
MockObject|PluginManager

getMockFailingConfigPluginManager()

Get a mock configuration plugin manager that will throw an exception.

protected getMockFailingConfigPluginManager(Throwable $exception) : MockObject|PluginManager
Parameters
$exception : Throwable

Exception to throw

Return values
MockObject|PluginManager

getTestRecord()

Get a record driver to test with.

protected getTestRecord([array<string|int, mixed> $rawData = [] ]) : TestHarness
Parameters
$rawData : array<string|int, mixed> = []

Data to load into the driver

Return values
TestHarness

Search results