VuFind API Documentation

SyndeticsTest extends TestCase
in package
Uses FixtureTrait

Unit tests for Syndetics cover loader.

Tags
category

VuFind

author

Damien Guillaume damieng@msu.edu

license

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

link
https://vufind.org

Table of Contents

testMissingIsbn()  : void
Test missing ISBN
testSizeNotFoundInMetadata()  : void
Test unknown size when using metadata
testUnavailableCoverLoading()  : void
Not finding an image filename in the Syndetics metadata.
testUnknownSize()  : void
Test unknown size without using metadata
testValidCoverLoadingWhenCheckingMetadata()  : void
Get image URL with a check the image is in the Syndetics metadata.
testValidCoverLoadingWithoutCheckingMetadata()  : void
Get image URL without a check the image is in the Syndetics metadata.
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).
getLoader()  : Syndetics
Get Syndetics object to test.

Methods

testMissingIsbn()

Test missing ISBN

public testMissingIsbn() : void
Return values
void

testSizeNotFoundInMetadata()

Test unknown size when using metadata

public testSizeNotFoundInMetadata() : void
Return values
void

testUnavailableCoverLoading()

Not finding an image filename in the Syndetics metadata.

public testUnavailableCoverLoading() : void
Return values
void

testUnknownSize()

Test unknown size without using metadata

public testUnknownSize() : void
Return values
void

testValidCoverLoadingWhenCheckingMetadata()

Get image URL with a check the image is in the Syndetics metadata.

public testValidCoverLoadingWhenCheckingMetadata() : void
Return values
void

testValidCoverLoadingWithoutCheckingMetadata()

Get image URL without a check the image is in the Syndetics metadata.

public testValidCoverLoadingWithoutCheckingMetadata() : 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>

getLoader()

Get Syndetics object to test.

protected getLoader([string|null $fixtureFile = null ][, string|null $isbn = '' ][, bool|null $useSyndeticsCoverImageFallback = true ]) : Syndetics
Parameters
$fixtureFile : string|null = null

Fixture file to return (null to skip downloader initialization)

$isbn : string|null = ''

ISBN

$useSyndeticsCoverImageFallback : bool|null = true

False to check metadata first

Return values
Syndetics

Search results