VuFind API Documentation

RecommendLinksTest extends TestCase
in package
Uses ConfigPluginManagerTrait

RecommendLinks recommendation module 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

$sampleLinks  : array<string|int, mixed>
Test configuration data.
testRecommendLinksWithCustomConfiguration()  : void
Test with custom configuration.
testRecommendLinksWithDefaultConfiguration()  : void
Test with default configuration.
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.
runTestProcedure()  : void
Run a test scenario

Properties

Test configuration data.

protected array<string|int, mixed> $sampleLinks = ['foo' => 'http://foo', 'bar' => 'http://bar']

Methods

testRecommendLinksWithCustomConfiguration()

Test with custom configuration.

public testRecommendLinksWithCustomConfiguration() : void
Return values
void

testRecommendLinksWithDefaultConfiguration()

Test with default configuration.

public testRecommendLinksWithDefaultConfiguration() : void
Return values
void

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

runTestProcedure()

Run a test scenario

protected runTestProcedure(PluginManager $cm, string $config) : void
Parameters
$cm : PluginManager

Configuration manager

$config : string

Recommendation config

Return values
void

Search results