VuFind API Documentation

ResultScrollerTest extends TestCase
in package
Uses ConfigPluginManagerTrait

ResultScroller controller plugin tests.

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

testDisabled()  : void
Test disabled behavior
testDisabledFirstLast()  : void
Test that first/last results can be disabled (this is the same as the testScrollingInMiddleOfPage() test, but with first/last setting off).
testNextPrevNavBug()  : void
Test next_prev_nav bug Expect next_prev to behave like it's disabled if the last search didn't return any results
testScrollingAtEndOfLastPage()  : void
Test scrolling for a record at the end of the last page (single-page example)
testScrollingAtEndOfLastPageInMultiPageScenario()  : void
Test scrolling for a record at the end of the last page (multi-page example)
testScrollingAtEndOfMiddlePage()  : void
Test scrolling at end of middle page.
testScrollingAtEndOfMiddlePageWithSorting()  : void
Test scrolling at end of middle page with sorting.
testScrollingAtStartOfFirstPage()  : void
Test scrolling for a record at the start of the first page
testScrollingAtStartOfMiddlePage()  : void
Test scrolling at beginning of middle page.
testScrollingInMiddleOfPage()  : void
Test scrolling for a record in the middle of the page
testScrollingOnSingleRecord()  : void
Test scrolling on single-record set
testScrollingToFirstRecord()  : void
Test scrolling to the first record in a set.
testScrollingToFirstRecordWithPageSize1()  : void
Test scrolling to the first record in a set (with page size set to 1).
testScrollingToLastRecord()  : void
Test scrolling to the last record in a set (with multiple records on the last page of results).
testScrollingToLastRecordAcrossPageBoundaries()  : void
Test scrolling to the last record in a set (with only one record on the last page of results).
getFirstLastConfig()  : array<string|int, mixed>
Get a configuration array to turn on first/last setting.
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.
getMockResults()  : Results
Get mock search results
getMockResultScroller()  : ResultScroller
Get mock result scroller

Methods

testDisabled()

Test disabled behavior

public testDisabled() : void
Return values
void

testDisabledFirstLast()

Test that first/last results can be disabled (this is the same as the testScrollingInMiddleOfPage() test, but with first/last setting off).

public testDisabledFirstLast() : void
Return values
void

testNextPrevNavBug()

Test next_prev_nav bug Expect next_prev to behave like it's disabled if the last search didn't return any results

public testNextPrevNavBug() : void
Return values
void

testScrollingAtEndOfLastPage()

Test scrolling for a record at the end of the last page (single-page example)

public testScrollingAtEndOfLastPage() : void
Return values
void

testScrollingAtEndOfLastPageInMultiPageScenario()

Test scrolling for a record at the end of the last page (multi-page example)

public testScrollingAtEndOfLastPageInMultiPageScenario() : void
Return values
void

testScrollingAtEndOfMiddlePage()

Test scrolling at end of middle page.

public testScrollingAtEndOfMiddlePage() : void
Return values
void

testScrollingAtEndOfMiddlePageWithSorting()

Test scrolling at end of middle page with sorting.

public testScrollingAtEndOfMiddlePageWithSorting() : void
Return values
void

testScrollingAtStartOfFirstPage()

Test scrolling for a record at the start of the first page

public testScrollingAtStartOfFirstPage() : void
Return values
void

testScrollingAtStartOfMiddlePage()

Test scrolling at beginning of middle page.

public testScrollingAtStartOfMiddlePage() : void
Return values
void

testScrollingInMiddleOfPage()

Test scrolling for a record in the middle of the page

public testScrollingInMiddleOfPage() : void
Return values
void

testScrollingOnSingleRecord()

Test scrolling on single-record set

public testScrollingOnSingleRecord() : void
Return values
void

testScrollingToFirstRecord()

Test scrolling to the first record in a set.

public testScrollingToFirstRecord() : void
Return values
void

testScrollingToFirstRecordWithPageSize1()

Test scrolling to the first record in a set (with page size set to 1).

public testScrollingToFirstRecordWithPageSize1() : void
Return values
void

testScrollingToLastRecord()

Test scrolling to the last record in a set (with multiple records on the last page of results).

public testScrollingToLastRecord() : void
Return values
void

testScrollingToLastRecordAcrossPageBoundaries()

Test scrolling to the last record in a set (with only one record on the last page of results).

public testScrollingToLastRecordAcrossPageBoundaries() : void
Return values
void

getFirstLastConfig()

Get a configuration array to turn on first/last setting.

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

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

getMockResults()

Get mock search results

protected getMockResults([int $page = 1 ][, int $limit = 20 ], int $total[, bool $firstLast = true ][, string $sort = null ]) : Results
Parameters
$page : int = 1

Current page number

$limit : int = 20

Page size

$total : int

Total size of fake result set

$firstLast : bool = true

Turn on first/last config?

$sort : string = null

Sort type (null for default)

Return values
Results

Search results