VuFind API Documentation

ResultFeedTest extends TestCase
in package
Uses LiveDetectionTrait, LiveSolrTrait, ViewTrait, TranslatorTrait

ResultFeed 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

$hasLiveDetectionTrait  : bool
Flag to allow other traits to test for the presence of this one (to enforce dependencies).
$liveSolrContainer  : MockContainer
Container for services related to live Solr connectivity.
continuousIntegrationRunning()  : bool
Is this test running in a continuous integration context?
setUp()  : void
Standard setup method.
testRSS()  : void
Test feed generation
createLiveSolrContainer()  : MockContainer
Create and populate container for services related to live Solr connectivity.
getBackend()  : object
Get a search backend
getLiveSolrContainer()  : MockContainer
Get container for services related to live Solr connectivity.
getMockTranslator()  : TranslatorInterface
Get mock translator.
getPathForTheme()  : string
Get the directory for a given theme.
getPhpRenderer()  : PhpRenderer
Get a working renderer.
getPlugins()  : array<string|int, mixed>
Get plugins to register to support view helper being tested
getResultsObject()  : Results
Get a search results object
getSearchMemoryViewHelper()  : SearchMemory
Get mock SearchMemory view helper

Properties

$hasLiveDetectionTrait

Flag to allow other traits to test for the presence of this one (to enforce dependencies).

public bool $hasLiveDetectionTrait = true

$liveSolrContainer

Container for services related to live Solr connectivity.

protected MockContainer $liveSolrContainer = null

Methods

continuousIntegrationRunning()

Is this test running in a continuous integration context?

public continuousIntegrationRunning() : bool
Return values
bool

setUp()

Standard setup method.

public setUp() : void
Return values
void

testRSS()

Test feed generation

public testRSS() : void
Return values
void

getBackend()

Get a search backend

protected getBackend([string $name = 'Solr' ]) : object
Parameters
$name : string = 'Solr'

Backend name

Return values
object

getMockTranslator()

Get mock translator.

protected getMockTranslator(array<string|int, mixed> $translations[, string $locale = 'en' ]) : TranslatorInterface
Parameters
$translations : array<string|int, mixed>

Key => value translation map.

$locale : string = 'en'

Locale, default to 'en'

Return values
TranslatorInterface

getPathForTheme()

Get the directory for a given theme.

protected getPathForTheme(string $theme) : string
Parameters
$theme : string

Theme directory name

Return values
string

getPhpRenderer()

Get a working renderer.

protected getPhpRenderer([array<string|int, mixed> $plugins = [] ][, string $theme = 'bootstrap3' ]) : PhpRenderer
Parameters
$plugins : array<string|int, mixed> = []

Custom VuFind plug-ins to register

$theme : string = 'bootstrap3'

Theme directory to load from

Return values
PhpRenderer

getPlugins()

Get plugins to register to support view helper being tested

protected getPlugins() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResultsObject()

Get a search results object

protected getResultsObject([string $name = 'Solr' ]) : Results
Parameters
$name : string = 'Solr'

Backend name

Return values
Results

getSearchMemoryViewHelper()

Get mock SearchMemory view helper

protected getSearchMemoryViewHelper([Memory|null $memory = null ]) : SearchMemory
Parameters
$memory : Memory|null = null

Optional search memory

Return values
SearchMemory

Search results