TabManagerTest
extends TestCase
in package
Uses
ConfigPluginManagerTrait
RecordTab Manager Test Class
Tags
Table of Contents
- $defaultConfig : array<string|int, mixed>
- Default configuration for mock plugin manager
- testGetBackgroundTabNames() : void
- Test getBackgroundTabNames.
- testGetTabDetailsForRecord() : void
- Test that we get the expected tab service names.
- 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.
- getMockPluginManager() : PluginManager
- Build a mock plugin manager.
- getTabManager() : TabManager
- Set up a tab manager for testing.
Properties
$defaultConfig
Default configuration for mock plugin manager
protected
array<string|int, mixed>
$defaultConfig
= ['RecordTabs' => ['VuFind\\RecordDriver\\EDS' => ['tabs' => ['xyzzy' => 'yzzyx', 'zip' => 'line'], 'defaultTab' => 'zip', 'backgroundLoadedTabs' => ['xyzzy']]]]
Methods
testGetBackgroundTabNames()
Test getBackgroundTabNames.
public
testGetBackgroundTabNames() : void
Return values
void —testGetTabDetailsForRecord()
Test that we get the expected tab service names.
public
testGetTabDetailsForRecord() : 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 —getMockPluginManager()
Build a mock plugin manager.
protected
getMockPluginManager() : PluginManager
Return values
PluginManager —getTabManager()
Set up a tab manager for testing.
protected
getTabManager([PluginManager $pluginManager = null ][, PluginManager $configManager = null ]) : TabManager
Parameters
- $pluginManager : PluginManager = null
-
Plugin manager to use (null for default)
- $configManager : PluginManager = null
-
Config manager to use (null for default)