VuFind API Documentation

DefaultRecordTest extends TestCase
in package
Uses FixtureTrait, ReflectionTrait

DefaultRecord Record Driver Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

Sravanthi Adusumilli vufind-tech@lists.sourceforge.net

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

getCleanISBNsProvider()  : array<string|int, mixed>
Data provider for testGetCleanISBNs
testCitationBehavior()  : void
Test citation behavior.
testGetBreadcrumb()  : void
Test getBreadcrumb for a record.
testGetCallNumber()  : void
Test getCallNumber for a record.
testGetCleanDOI()  : void
Test getCleanDOI for a record.
testGetCleanISBNs()  : void
Test getCleanISBNs for a record.
testGetCoinsOpenUrl()  : void
Test getCoinsOpenUrl for a record.
testGetContainerReference()  : void
Test getContainerReference for a record.
testGetCoordinateLabels()  : void
Test getCoordinateLabels for a record.
testGetCorporateAuthors()  : void
Test getCorporateAuthors for a record.
testGetCorporateAuthorsRoles()  : void
Test getCorporateAuthorsRoles for a record.
testGetDateSpan()  : void
Test getDateSpan for a record.
testGetDeduplicatedAuthors()  : void
Test whether author deduplication works corrrectly.
testGetDisplayCoordinates()  : void
Test getDisplayCoordinates for a record.
testGetGeoLocation()  : void
Test getDisplayCoordinates for a record.
testGetInstitutions()  : void
Test getInstitutions for a record.
testGetLastIndexed()  : void
Test getLastIndexed for a record.
testGetLCCN()  : void
Test getLCCN for a record.
testGetNewerTitles()  : void
Test getNewerTitles for a record.
testGetOpenUrl()  : void
Test getOpenUrl for a record.
testGetPhysicalDescriptions()  : void
Test getPhysicalDescriptions for a record.
testGetPreviousTitles()  : void
Test getPreviousTitles for a record.
testGetPrimaryAuthor()  : void
Test getPrimaryAuthor for a record.
testGetPrimaryAuthorsRoles()  : void
Test getPrimaryAuthorsRoles for a record.
testGetPrimaryAuthorsWithHighlighting()  : void
Test getPrimaryAuthorsWithHighlighting for a record.
testGetPublicationDates()  : void
Test getPublicationDates for a record.
testGetPublicationDetails()  : void
Test getPublicationDetails for a record.
testGetSchemaOrgFormats()  : void
Test getSchemaOrgFormats for a record.
testGetSecondaryAuthors()  : void
Test getSecondaryAuthors for a record.
testGetSecondaryAuthorsRoles()  : void
Test getSecondaryAuthorsRoles for a record.
testGetSortTitle()  : void
Test getSortTitle for a record.
testGetSubtitle()  : void
Test getSubtitle for a record.
testGetSummary()  : void
Test getSummary for a record.
testGetThumbnail()  : void
Test getThumbnail for a record.
testGetTOC()  : void
Test getURLs for a record.
testGetURLs()  : void
Test getURLs for a record.
callMethod()  : mixed
Call protected or private method for side-effect and result.
getDriver()  : SolrDefault
Get a record driver with fake data.
getFixture()  : string
Load a fixture file.
getFixtureDir()  : string
Get the base directory containing fixtures.
getFixturePath()  : string
Resolve fixture path.
getJsonFixture()  : array<string|int, mixed>
Load a JSON fixture from file (using associative array return type).
getProperty()  : mixed
Return protected or private property.
setProperty()  : void
Set protected or private property.

Methods

getCleanISBNsProvider()

Data provider for testGetCleanISBNs

public static getCleanISBNsProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

testCitationBehavior()

Test citation behavior.

public testCitationBehavior() : void
Return values
void

testGetBreadcrumb()

Test getBreadcrumb for a record.

public testGetBreadcrumb() : void
Return values
void

testGetCallNumber()

Test getCallNumber for a record.

public testGetCallNumber() : void
Return values
void

testGetCleanDOI()

Test getCleanDOI for a record.

public testGetCleanDOI() : void
Return values
void

testGetCleanISBNs()

Test getCleanISBNs for a record.

public testGetCleanISBNs(array<string|int, mixed> $result, string $mode, bool $filterInvalid) : void
Parameters
$result : array<string|int, mixed>

Expected result

$mode : string

Retrieval mode

$filterInvalid : bool

Should we filter invalid ISBNs?

Tags
dataProvider

getCleanISBNsProvider

Return values
void

testGetCoinsOpenUrl()

Test getCoinsOpenUrl for a record.

public testGetCoinsOpenUrl() : void
Return values
void

testGetContainerReference()

Test getContainerReference for a record.

public testGetContainerReference() : void
Return values
void

testGetCoordinateLabels()

Test getCoordinateLabels for a record.

public testGetCoordinateLabels() : void
Return values
void

testGetCorporateAuthors()

Test getCorporateAuthors for a record.

public testGetCorporateAuthors() : void
Return values
void

testGetCorporateAuthorsRoles()

Test getCorporateAuthorsRoles for a record.

public testGetCorporateAuthorsRoles() : void
Return values
void

testGetDateSpan()

Test getDateSpan for a record.

public testGetDateSpan() : void
Return values
void

testGetDeduplicatedAuthors()

Test whether author deduplication works corrrectly.

public testGetDeduplicatedAuthors() : void
Return values
void

testGetDisplayCoordinates()

Test getDisplayCoordinates for a record.

public testGetDisplayCoordinates() : void
Return values
void

testGetGeoLocation()

Test getDisplayCoordinates for a record.

public testGetGeoLocation() : void
Return values
void

testGetInstitutions()

Test getInstitutions for a record.

public testGetInstitutions() : void
Return values
void

testGetLastIndexed()

Test getLastIndexed for a record.

public testGetLastIndexed() : void
Return values
void

testGetLCCN()

Test getLCCN for a record.

public testGetLCCN() : void
Return values
void

testGetNewerTitles()

Test getNewerTitles for a record.

public testGetNewerTitles() : void
Return values
void

testGetOpenUrl()

Test getOpenUrl for a record.

public testGetOpenUrl() : void
Return values
void

testGetPhysicalDescriptions()

Test getPhysicalDescriptions for a record.

public testGetPhysicalDescriptions() : void
Return values
void

testGetPreviousTitles()

Test getPreviousTitles for a record.

public testGetPreviousTitles() : void
Return values
void

testGetPrimaryAuthor()

Test getPrimaryAuthor for a record.

public testGetPrimaryAuthor() : void
Return values
void

testGetPrimaryAuthorsRoles()

Test getPrimaryAuthorsRoles for a record.

public testGetPrimaryAuthorsRoles() : void
Return values
void

testGetPrimaryAuthorsWithHighlighting()

Test getPrimaryAuthorsWithHighlighting for a record.

public testGetPrimaryAuthorsWithHighlighting() : void
Return values
void

testGetPublicationDates()

Test getPublicationDates for a record.

public testGetPublicationDates() : void
Return values
void

testGetPublicationDetails()

Test getPublicationDetails for a record.

public testGetPublicationDetails() : void
Return values
void

testGetSchemaOrgFormats()

Test getSchemaOrgFormats for a record.

public testGetSchemaOrgFormats() : void
Return values
void

testGetSecondaryAuthors()

Test getSecondaryAuthors for a record.

public testGetSecondaryAuthors() : void
Return values
void

testGetSecondaryAuthorsRoles()

Test getSecondaryAuthorsRoles for a record.

public testGetSecondaryAuthorsRoles() : void
Return values
void

testGetSortTitle()

Test getSortTitle for a record.

public testGetSortTitle() : void
Return values
void

testGetSubtitle()

Test getSubtitle for a record.

public testGetSubtitle() : void
Return values
void

testGetSummary()

Test getSummary for a record.

public testGetSummary() : void
Return values
void

testGetThumbnail()

Test getThumbnail for a record.

public testGetThumbnail() : void
Return values
void

testGetTOC()

Test getURLs for a record.

public testGetTOC() : void
Return values
void

testGetURLs()

Test getURLs for a record.

public testGetURLs() : void
Return values
void

callMethod()

Call protected or private method for side-effect and result.

protected callMethod(object|string $object, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed

Uses PHP's reflection API in order to modify method accessibility.

Parameters
$object : object|string

Object or class name

$method : string

Method name

$arguments : array<string|int, mixed> = []

Method arguments

Tags
throws
ReflectionException

Method does not exist

Return values
mixed

getDriver()

Get a record driver with fake data.

protected getDriver([array<string|int, mixed> $overrides = [] ][, Config $mainConfig = null ]) : SolrDefault
Parameters
$overrides : array<string|int, mixed> = []

Fixture fields to override.

$mainConfig : Config = null

Main configuration (optional).

Return values
SolrDefault

getFixture()

Load a fixture file.

protected getFixture(string $filename[, string $module = 'VuFind' ]) : string
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Tags
throws
RuntimeException
Return values
string

getFixtureDir()

Get the base directory containing fixtures.

protected getFixtureDir([string $module = 'VuFind' ]) : string
Parameters
$module : string = 'VuFind'

Module containing fixture.

Return values
string

getFixturePath()

Resolve fixture path.

protected getFixturePath(string $filename[, string $module = 'VuFind' ]) : string
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Tags
throws
RuntimeException
Return values
string

getJsonFixture()

Load a JSON fixture from file (using associative array return type).

protected getJsonFixture(string $filename[, string $module = 'VuFind' ]) : array<string|int, mixed>
Parameters
$filename : string

Filename relative to fixture directory.

$module : string = 'VuFind'

Module containing fixture.

Return values
array<string|int, mixed>

getProperty()

Return protected or private property.

protected getProperty(object|string $object, string $property) : mixed

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

Tags
throws
ReflectionException

Property does not exist

Return values
mixed

setProperty()

Set protected or private property.

protected setProperty(object|string $object, string $property, mixed $value) : void

Uses PHP's reflection API in order to modify property accessibility.

Parameters
$object : object|string

Object or class name

$property : string

Property name

$value : mixed

Property value

Tags
throws
ReflectionException

Property does not exist

Return values
void

Search results