VuFind API Documentation

LoaderTest extends TestCase
in package

Cover Loader 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

$testTheme  : string
Theme to use for testing purposes.
testDefaultLoadingForContentType()  : void
Test that requesting a content type causes default data to load.
testDefaultLoadingForImage()  : void
Test that requesting an image causes default data to load.
testFailImageIllegalExtension()  : void
Test illegal file extension
testMissingUserSpecifiedFailImage()  : void
Test missing user-specified fail image
testUtterFailure()  : void
Test that failure to load even the baseline image causes an exception.
getLoader()  : Loader|MockObject
Get a loader object to test.
getThemeDir()  : string
Get the theme directory.

Properties

$testTheme

Theme to use for testing purposes.

protected string $testTheme = 'bootstrap3'

Methods

testDefaultLoadingForContentType()

Test that requesting a content type causes default data to load.

public testDefaultLoadingForContentType() : void
Return values
void

testDefaultLoadingForImage()

Test that requesting an image causes default data to load.

public testDefaultLoadingForImage() : void

(same as above test, but with assertions in different order to force appropriate loading).

Return values
void

testFailImageIllegalExtension()

Test illegal file extension

public testFailImageIllegalExtension() : void
Return values
void

testMissingUserSpecifiedFailImage()

Test missing user-specified fail image

public testMissingUserSpecifiedFailImage() : void
Return values
void

testUtterFailure()

Test that failure to load even the baseline image causes an exception.

public testUtterFailure() : void
Return values
void

getLoader()

Get a loader object to test.

protected getLoader([array<string|int, mixed> $config = [] ][, PluginManager $manager = null ][, ThemeInfo $theme = null ][, HttpService $httpService = null ][, array<string|int, mixed>|bool $mock = false ]) : Loader|MockObject
Parameters
$config : array<string|int, mixed> = []

Configuration

$manager : PluginManager = null

Plugin manager (null to create mock)

$theme : ThemeInfo = null

Theme info object (null to create default)

$httpService : HttpService = null

HTTP client factory

$mock : array<string|int, mixed>|bool = false

Array of functions to mock, or false for real object

Return values
Loader|MockObject

getThemeDir()

Get the theme directory.

protected getThemeDir() : string
Return values
string

Search results