VuFind API Documentation

ComposedDriverTest extends AbstractMultiDriverTestCase
in package

ILS driver test

Tags
category

VuFind

author

Kyle McGrogan km7717@ship.edu

author

Ere Maijala ere.maijala@helsinki.fi

license

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

link

Main Page

Table of Contents

testCombineArraysOfAssociativeArraysBaseMainDriverNoSupportNoSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and only base main driver
testCombineArraysOfAssociativeArraysBaseMainDriverNoSupportWithSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and only base main driver with results in subfields
testCombineArraysOfAssociativeArraysBaseMainDriverWithSupportNoSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and base main driver and with support drivers
testCombineArraysOfAssociativeArraysBaseMainDriverWithSupportWithSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and base main driver with results in subfields and with support drivers
testCombineArraysOfAssociativeArraysOverwrittenMainDriverNoSupportNoSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and overwritten main driver with results in subfields
testCombineArraysOfAssociativeArraysOverwrittenMainDriverNoSupportWithSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and overwritten main driver with support drivers
testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithoutOptionResultSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and overwritten main driver without optional result subfields
testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithSupportNoSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and overwritten main driver with support drivers
testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithSupportWithSubfields()  : void
Testing method with combineArraysOfAssociativeArrays and overwritten main driver with results in subfields and with support drivers
testCombineMultipleArraysOfAssociativeArraysBaseMainDriverWithoutSupport()  : void
Testing method with combineMultipleArraysOfAssociativeArrays and base main driver without support
testCombineMultipleArraysOfAssociativeArraysBaseMainDriverWithSupport()  : void
Testing method with combineMultipleArraysOfAssociativeArrays and base main driver with support
testCombineMultipleArraysOfAssociativeArraysOverwrittenMainDriverWithoutSupport()  : void
Testing method with combineMultipleArraysOfAssociativeArrays and overwritten main driver without support
testDefaultCallBaseMainDriver()  : void
Testing method with defaultCall and multiple drivers but using base main_driver
testDefaultCallOverwrittenMainDriver()  : void
Testing method with defaultCall and multiple drivers and overwritten main_driver
testDefaultCallSingleMainDriver()  : void
Testing method with defaultCall and only main driver
testeCombineMultipleArraysOfAssociativeArraysOverwrittenMainDriverWithSupport()  : void
Testing method with combineMultipleArraysOfAssociativeArrays and overwritten main driver with support
testGetDriver()  : void
Test that MultiBackend can properly retrieve a new driver.
testGetDriverConfig()  : void
Tests that getDriverConfig works correctly
testILSConfigurationPathWithDriverConfigPath()  : void
Test that driver handles ILS driver configuration loading properly when drivers_config_path is defined.
testILSConfigurationPathWithoutDriverConfigPath()  : void
Test that driver handles ILS driver configuration loading properly when drivers_config_path is not defined.
testInitialization()  : void
Test that the driver can be properly initialized.
testLogging()  : array<string|int, mixed>
Tests that logging works correctly
testMergeSingleArrayResultsBaseMainDriverWithoutSupport()  : void
Testing method with mergeSingleArrayResults and base main driver without support
testMergeSingleArrayResultsBaseMainDriverWithSupport()  : void
Testing method with mergeSingleArrayResults and base main driver with support
testMergeSingleArrayResultsOverwrittenMainDriverWithoutSupport()  : void
Testing method with mergeSingleArrayResults and overwritten main driver without support
testMergeSingleArrayResultsOverwrittenMainDriverWithSupport()  : void
Testing method with mergeSingleArrayResults and overwritten main driver with support
testMissingConfiguration()  : void
Test that driver complains about missing configuration.
testMissingILSConfiguration()  : void
Test that driver handles missing main ILS driver configuration properly.
callMethod()  : mixed
Call protected or private method for side-effect and result.
getDriver()  : mixed
Method to get a raw ComposedDriver instance.
getMockConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager with the given configuration "files" available.
getMockDemoDriver()  : Demo
Get a mock Demo driver
getMockFailingConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager that will throw an exception.
getMockILS()  : AbstractBase
Get a mock driver
getMockSM()  : object
This function returns a mock service manager with the given parameters For examples of what is to be passed, see: http://www.phpunit.de/manual/3.0/en/mock-objects.html
getMultiDriverForDrivers()  : AbstractMultiDriver
Create a Multi Driver for the given ILS drivers
getPatron()  : array<string|int, mixed>
Method to get a patron with the given username
getProperty()  : mixed
Return protected or private property.
initDriver()  : mixed
Method to get an initialized Composed Driver.
initSimpleMethodTest()  : object
Initialize a ComposedDriver driver for a simple method test
setProperty()  : void
Set protected or private property.

Methods

testCombineArraysOfAssociativeArraysBaseMainDriverNoSupportNoSubfields()

Testing method with combineArraysOfAssociativeArrays and only base main driver

public testCombineArraysOfAssociativeArraysBaseMainDriverNoSupportNoSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysBaseMainDriverNoSupportWithSubfields()

Testing method with combineArraysOfAssociativeArrays and only base main driver with results in subfields

public testCombineArraysOfAssociativeArraysBaseMainDriverNoSupportWithSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysBaseMainDriverWithSupportNoSubfields()

Testing method with combineArraysOfAssociativeArrays and base main driver and with support drivers

public testCombineArraysOfAssociativeArraysBaseMainDriverWithSupportNoSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysBaseMainDriverWithSupportWithSubfields()

Testing method with combineArraysOfAssociativeArrays and base main driver with results in subfields and with support drivers

public testCombineArraysOfAssociativeArraysBaseMainDriverWithSupportWithSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysOverwrittenMainDriverNoSupportNoSubfields()

Testing method with combineArraysOfAssociativeArrays and overwritten main driver with results in subfields

public testCombineArraysOfAssociativeArraysOverwrittenMainDriverNoSupportNoSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysOverwrittenMainDriverNoSupportWithSubfields()

Testing method with combineArraysOfAssociativeArrays and overwritten main driver with support drivers

public testCombineArraysOfAssociativeArraysOverwrittenMainDriverNoSupportWithSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithoutOptionResultSubfields()

Testing method with combineArraysOfAssociativeArrays and overwritten main driver without optional result subfields

public testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithoutOptionResultSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithSupportNoSubfields()

Testing method with combineArraysOfAssociativeArrays and overwritten main driver with support drivers

public testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithSupportNoSubfields() : void
Return values
void

testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithSupportWithSubfields()

Testing method with combineArraysOfAssociativeArrays and overwritten main driver with results in subfields and with support drivers

public testCombineArraysOfAssociativeArraysOverwrittenMainDriverWithSupportWithSubfields() : void
Return values
void

testCombineMultipleArraysOfAssociativeArraysBaseMainDriverWithoutSupport()

Testing method with combineMultipleArraysOfAssociativeArrays and base main driver without support

public testCombineMultipleArraysOfAssociativeArraysBaseMainDriverWithoutSupport() : void
Return values
void

testCombineMultipleArraysOfAssociativeArraysBaseMainDriverWithSupport()

Testing method with combineMultipleArraysOfAssociativeArrays and base main driver with support

public testCombineMultipleArraysOfAssociativeArraysBaseMainDriverWithSupport() : void
Return values
void

testCombineMultipleArraysOfAssociativeArraysOverwrittenMainDriverWithoutSupport()

Testing method with combineMultipleArraysOfAssociativeArrays and overwritten main driver without support

public testCombineMultipleArraysOfAssociativeArraysOverwrittenMainDriverWithoutSupport() : void
Return values
void

testDefaultCallBaseMainDriver()

Testing method with defaultCall and multiple drivers but using base main_driver

public testDefaultCallBaseMainDriver() : void
Return values
void

testDefaultCallOverwrittenMainDriver()

Testing method with defaultCall and multiple drivers and overwritten main_driver

public testDefaultCallOverwrittenMainDriver() : void
Return values
void

testDefaultCallSingleMainDriver()

Testing method with defaultCall and only main driver

public testDefaultCallSingleMainDriver() : void
Return values
void

testeCombineMultipleArraysOfAssociativeArraysOverwrittenMainDriverWithSupport()

Testing method with combineMultipleArraysOfAssociativeArrays and overwritten main driver with support

public testeCombineMultipleArraysOfAssociativeArraysOverwrittenMainDriverWithSupport() : void
Return values
void

testGetDriver()

Test that MultiBackend can properly retrieve a new driver.

public testGetDriver() : void
Return values
void

testGetDriverConfig()

Tests that getDriverConfig works correctly

public testGetDriverConfig() : void
Return values
void

testILSConfigurationPathWithDriverConfigPath()

Test that driver handles ILS driver configuration loading properly when drivers_config_path is defined.

public testILSConfigurationPathWithDriverConfigPath() : void
Return values
void

testILSConfigurationPathWithoutDriverConfigPath()

Test that driver handles ILS driver configuration loading properly when drivers_config_path is not defined.

public testILSConfigurationPathWithoutDriverConfigPath() : void
Return values
void

testInitialization()

Test that the driver can be properly initialized.

public testInitialization() : void
Return values
void

testLogging()

Tests that logging works correctly

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

testMergeSingleArrayResultsBaseMainDriverWithoutSupport()

Testing method with mergeSingleArrayResults and base main driver without support

public testMergeSingleArrayResultsBaseMainDriverWithoutSupport() : void
Return values
void

testMergeSingleArrayResultsBaseMainDriverWithSupport()

Testing method with mergeSingleArrayResults and base main driver with support

public testMergeSingleArrayResultsBaseMainDriverWithSupport() : void
Return values
void

testMergeSingleArrayResultsOverwrittenMainDriverWithoutSupport()

Testing method with mergeSingleArrayResults and overwritten main driver without support

public testMergeSingleArrayResultsOverwrittenMainDriverWithoutSupport() : void
Return values
void

testMergeSingleArrayResultsOverwrittenMainDriverWithSupport()

Testing method with mergeSingleArrayResults and overwritten main driver with support

public testMergeSingleArrayResultsOverwrittenMainDriverWithSupport() : void
Return values
void

testMissingConfiguration()

Test that driver complains about missing configuration.

public testMissingConfiguration() : void
Return values
void

testMissingILSConfiguration()

Test that driver handles missing main ILS driver configuration properly.

public testMissingILSConfiguration() : void
Return values
void

callMethod()

Call protected or private method for side-effect and result.

protected callMethod(object|string $object, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed

Uses PHP's reflection API in order to modify method accessibility.

Parameters
$object : object|string

Object or class name

$method : string

Method name

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

Method arguments

Tags
throws
ReflectionException

Method does not exist

Return values
mixed

getDriver()

Method to get a raw ComposedDriver instance.

protected getDriver([array<string|int, mixed> $constructorArgs = [] ]) : mixed
Parameters
$constructorArgs : array<string|int, mixed> = []

Optional constructor arguments

Return values
mixed

A ComposedDriver instance.

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

getMockILS()

Get a mock driver

protected getMockILS(string $type[, array<string|int, mixed> $methods = null ]) : AbstractBase
Parameters
$type : string

Type of driver to make

$methods : array<string|int, mixed> = null

Array of methods to stub

Return values
AbstractBase

getMockSM()

This function returns a mock service manager with the given parameters For examples of what is to be passed, see: http://www.phpunit.de/manual/3.0/en/mock-objects.html

protected getMockSM([object $times = null ][, object $driver = 'Voyager' ][, mixed $return = null ]) : object
Parameters
$times : object = null

The number of times it is expected to be called.

$driver : object = 'Voyager'

The driver type this SM will expect to be called with.

$return : mixed = null

What that get function should return.

Return values
object

The Mock Service Manager created.

getMultiDriverForDrivers()

Create a Multi Driver for the given ILS drivers

protected getMultiDriverForDrivers(array<string|int, mixed> $drivers[, mixed $count = null ]) : AbstractMultiDriver
Parameters
$drivers : array<string|int, mixed>

Array of drivers with prefix as key and driver instance as value

$count : mixed = null

How many drivers are expected to be used. Default is that all defined drivers are to be used.

Return values
AbstractMultiDriver

getPatron()

Method to get a patron with the given username

protected getPatron(string $username[, string $instance = null ]) : array<string|int, mixed>
Parameters
$username : string

The username to use

$instance : string = null

The instance to append before the username

Return values
array<string|int, mixed>

A patron array.

getProperty()

Return protected or private property.

protected getProperty(object|string $object, string $property) : mixed

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

Tags
throws
ReflectionException

Property does not exist

Return values
mixed

initDriver()

Method to get an initialized Composed Driver.

protected initDriver([array<string|int, mixed> $constructorArgs = [] ][, array<string|int, mixed> $drivers = [] ][, string|null $driversConfigPath = null ]) : mixed
Parameters
$constructorArgs : array<string|int, mixed> = []

Optional constructor arguments

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

List of used drivers

$driversConfigPath : string|null = null

Optional driver config path

Return values
mixed

A ComposedDriver instance.

initSimpleMethodTest()

Initialize a ComposedDriver driver for a simple method test

protected initSimpleMethodTest(string $function, array<string|int, mixed> $params, array<string|int, mixed> $functionConfig, array<string|int, mixed> $driverConfigs) : object
Parameters
$function : string

Function name

$params : array<string|int, mixed>

Function parameters

$functionConfig : array<string|int, mixed>

Config for the given function

$driverConfigs : array<string|int, mixed>

Associative array which maps driver names to class, number of calls and result

Return values
object

MultiBackend driver

setProperty()

Set protected or private property.

protected setProperty(object|string $object, string $property, mixed $value) : void

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

$value : mixed

Property value

Tags
throws
ReflectionException

Property does not exist

Return values
void

Search results