DAIATest
extends ILSDriverTestCase
in package
Uses
FixtureTrait
ILS driver test
Tags
Table of Contents
- $driver : AbstractBase
- ILS driver
- $testResult : mixed
- setUp() : void
- Standard setup method.
- testJSONgetStatus() : void
- Test
- testMissingConfiguration() : void
- Test that driver complains about missing configuration.
- testXMLgetStatus() : void
- Test
- createConnector() : Connector
- Create connector with fixture file.
- 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).
Properties
$driver
ILS driver
protected
AbstractBase
$driver
$testResult
protected
mixed
$testResult
= [0 => ['status' => '', 'availability' => true, 'duedate' => null, 'requests_placed' => '', 'id' => '027586081', 'item_id' => 'http://uri.gbv.de/document/opac-de-000:epn:711134758', 'ilslink' => 'http://opac.example-library.edu/loan/REQ?EPN=711134758', 'number' => 1, 'barcode' => '1', 'reserve' => 'N', 'callnumber' => 'ABC 12', 'location' => 'Example Library for DAIA Tests', 'locationid' => 'http://uri.gbv.de/organization/isil/DE-000', 'locationhref' => 'http://www.example-library.edu', 'storage' => 'Abteilung III', 'storageid' => '', 'storagehref' => '', 'item_notes' => [], 'services' => ['loan', 'presentation'], 'is_holdable' => false, 'addLink' => false, 'holdtype' => null, 'addStorageRetrievalRequestLink' => true, 'customData' => [], 'limitation_types' => [], 'doc_id' => 'http://uri.gbv.de/document/opac-de-000:ppn:027586081'], 1 => ['status' => '', 'availability' => true, 'duedate' => null, 'requests_placed' => '', 'id' => '027586081', 'item_id' => 'http://uri.gbv.de/document/opac-de-000:epn:711134766', 'ilslink' => 'http://opac.example-library.edu/DB=1/PPNSET?PPN=027586081', 'number' => 2, 'barcode' => '1', 'reserve' => 'N', 'callnumber' => 'DEF 34', 'location' => 'Example Library for DAIA Tests', 'locationid' => 'http://uri.gbv.de/organization/isil/DE-000', 'locationhref' => 'http://www.example-library.edu', 'storage' => 'Abteilung III', 'storageid' => '', 'storagehref' => '', 'item_notes' => ['mit Zustimmung', 'nur Kopie'], 'services' => ['loan', 'presentation'], 'is_holdable' => false, 'addLink' => false, 'holdtype' => null, 'addStorageRetrievalRequestLink' => false, 'customData' => [], 'limitation_types' => [], 'doc_id' => 'http://uri.gbv.de/document/opac-de-000:ppn:027586081'], 2 => ['status' => '', 'availability' => false, 'duedate' => '02-09-2115', 'requests_placed' => '', 'id' => '027586081', 'item_id' => 'http://uri.gbv.de/document/opac-de-000:epn:7111347777', 'ilslink' => 'http://opac.example-library.edu/DB=1/PPNSET?PPN=027586081', 'number' => 3, 'barcode' => '1', 'reserve' => 'N', 'callnumber' => 'GHI 56', 'location' => 'Example Library for DAIA Tests', 'locationid' => 'http://uri.gbv.de/organization/isil/DE-000', 'locationhref' => 'http://www.example-library.edu', 'storage' => 'Abteilung III', 'storageid' => '', 'storagehref' => '', 'item_notes' => [], 'services' => [], 'is_holdable' => false, 'addLink' => false, 'holdtype' => null, 'addStorageRetrievalRequestLink' => false, 'customData' => [], 'limitation_types' => [], 'doc_id' => 'http://uri.gbv.de/document/opac-de-000:ppn:027586081']]
Methods
setUp()
Standard setup method.
public
setUp() : void
Return values
void —testJSONgetStatus()
Test
public
testJSONgetStatus() : void
Return values
void —testMissingConfiguration()
Test that driver complains about missing configuration.
public
testMissingConfiguration() : void
Return values
void —testXMLgetStatus()
Test
public
testXMLgetStatus() : void
Return values
void —createConnector()
Create connector with fixture file.
protected
createConnector([string $fixture = null ]) : Connector
Parameters
- $fixture : string = null
-
Fixture file
Tags
Return values
Connector —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
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
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.