VuFind API Documentation

SolrMarcTest extends TestCase
in package
Uses FixtureTrait

SolrMarc Record Driver Test Class

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

author

David Maus maus@hab.de

author

Preetha Rao vufind-tech@lists.sourceforge.net

license

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

link

Wiki

Table of Contents

getSchemaOrgFormatsArrayProvider()  : array<string|int, array<string|int, mixed>>
Data provider for testGetSchemaOrgFormatsArray().
marcSubjectHeadingsSortOptionsProvider()  : array<string|int, array<string|int, mixed>>
Config and data for assertion of Subject Headings Order (testSubjectHeadingsOrder)
testBug1()  : void
Test a record that used to be known to cause problems because of the way its linking fields are set up.
testBug2()  : void
Test a record that used to be known to cause problems because of the way series name was handled (the old "Bug2" test from VuFind 1.x).
testGetFormattedMarcDetails()  : void
Test getFormattedMarcDetails() method.
testGetSchemaOrgFormatsArray()  : void
Test getSchemaOrgFormatsArray().
testMarcReaderTrait()  : void
Test methods in MarcReaderTrait.
testSubjectHeadings()  : void
Test regular and extended subject heading support.
testSubjectHeadingsOrder()  : void
Test regular and extended subject heading support for different possible config options.
testTOC()  : void
Test table of contents support.
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).

Methods

getSchemaOrgFormatsArrayProvider()

Data provider for testGetSchemaOrgFormatsArray().

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

marcSubjectHeadingsSortOptionsProvider()

Config and data for assertion of Subject Headings Order (testSubjectHeadingsOrder)

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

testBug1()

Test a record that used to be known to cause problems because of the way its linking fields are set up.

public testBug1() : void

Note: while Bug2 below is named for consistency with VuFind 1.x, this is named Bug1 simply to fill the gap. It's related to a problem that was discovered later. See VUFIND-1034 in JIRA.

Return values
void

testBug2()

Test a record that used to be known to cause problems because of the way series name was handled (the old "Bug2" test from VuFind 1.x).

public testBug2() : void
Return values
void

testGetFormattedMarcDetails()

Test getFormattedMarcDetails() method.

public testGetFormattedMarcDetails() : void
Return values
void

testGetSchemaOrgFormatsArray()

Test getSchemaOrgFormatsArray().

public testGetSchemaOrgFormatsArray(bool $useIls, array<string|int, mixed> $expectedFormats) : void
Parameters
$useIls : bool

Should we attach an ILS to the record driver?

$expectedFormats : array<string|int, mixed>

The expected method output

Tags
dataProvider

getSchemaOrgFormatsArrayProvider

Return values
void

testMarcReaderTrait()

Test methods in MarcReaderTrait.

public testMarcReaderTrait() : void
Return values
void

testSubjectHeadings()

Test regular and extended subject heading support.

public testSubjectHeadings() : void
Return values
void

testSubjectHeadingsOrder()

Test regular and extended subject heading support for different possible config options.

public testSubjectHeadingsOrder(string|null $marcSubjectHeadingsSortConfig, array<string|int, mixed> $expectedResults) : void
Parameters
$marcSubjectHeadingsSortConfig : string|null

The config value for $this->mainConfig->Record->marcSubjectHeadingsSort

$expectedResults : array<string|int, mixed>

Array of the expected values returned from $record->getAllSubjectHeadings()

Tags
dataProvider

marcSubjectHeadingsSortOptionsProvider

Return values
void

testTOC()

Test table of contents support.

public testTOC() : void
Return values
void

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>

Search results