PAIATest
extends ILSDriverTestCase
in package
Uses
FixtureTrait
ILS driver test
Tags
Table of Contents
- $driver : AbstractBase
- ILS driver
- $feeTestResult : mixed
- $holdsTestResult : mixed
- $patron : mixed
- $patron_bad : mixed
- $patron_expired : mixed
- $profileTestResult : mixed
- $pwchangeTestResult : mixed
- $renewTestResult : mixed
- $requestsTestResult : mixed
- $storageRetrievalTestResult : mixed
- $transactionsTestResult : mixed
- $validConfig : mixed
- setUp() : void
- Standard setup method.
- testChangePassword() : void
- Test
- testFees() : void
- Test
- testGetAccountBlocks() : void
- Test getAccountBlocks
- testHolds() : void
- Test
- testMissingConfiguration() : void
- Test that driver complains about missing configuration.
- testPlaceHold() : void
- Test
- testPlaceStorageRetrievalRequest() : void
- Test
- testProfile() : void
- Test
- testRenew() : void
- Test
- testRenewDetails() : void
- Test
- testRequests() : void
- Test
- testTransactions() : void
- Test
- testValidRequest() : void
- Test
- createConnector() : Connector
- Create connector with fixture file.
- createMockConnector() : 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.
- getHttpService() : HttpService
- Create HTTP service for testing.
- getJsonFixture() : array<string|int, mixed>
- Load a JSON fixture from file (using associative array return type).
Properties
$driver
ILS driver
protected
AbstractBase
$driver
$feeTestResult
protected
mixed
$feeTestResult
= [0 => ['amount' => 160.0, 'checkout' => '', 'fine' => 'Vormerkgebuehr', 'balance' => 160.0, 'createdate' => '06-07-2016', 'duedate' => '', 'id' => '', 'title' => 'Open source licensing : software freedom and intellectual property law ; ' . '[open source licensees are free to: use open source software for any purpose, make and' . ' distribute copies, create and distribute derivative works, access and use the source code, ' . 'com / Rosen, Lawrence (c 2005)', 'feeid' => null, 'about' => 'Open source licensing : software freedom and intellectual property law ; ' . '[open source licensees are free to: use open source software for any purpose, make and' . ' distribute copies, create and distribute derivative works, access and use the source code, ' . 'com / Rosen, Lawrence (c 2005)', 'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$28295402'], 1 => ['amount' => 80.0, 'checkout' => '', 'fine' => 'Vormerkgebuehr', 'balance' => 80.0, 'createdate' => '05-23-2016', 'duedate' => '', 'id' => '', 'title' => 'Test framework in action / Allen, Rob (2009)', 'feeid' => null, 'about' => 'Test framework in action / Allen, Rob (2009)', 'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$28323471'], 2 => ['amount' => 300.0, 'checkout' => '', 'fine' => 'Säumnisgebühr', 'balance' => 300.0, 'createdate' => '05-23-2016', 'duedate' => '', 'id' => '', 'title' => 'Unsere historischen Gärten / Lutze, Margot (1986)', 'feeid' => null, 'about' => 'Unsere historischen Gärten / Lutze, Margot (1986)', 'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$24476416'], 3 => ['amount' => 100.0, 'checkout' => '', 'fine' => 'Säumnisgebühr', 'balance' => 100.0, 'createdate' => '06-16-2016', 'duedate' => '', 'id' => '', 'title' => 'Triumphe des Backsteins = Triumphs of brick / (1992)', 'feeid' => null, 'about' => 'Triumphe des Backsteins = Triumphs of brick / (1992)', 'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$33204941'], 4 => ['amount' => 100.0, 'checkout' => '', 'fine' => 'Säumnisgebühr', 'balance' => 100.0, 'createdate' => '05-23-2016', 'duedate' => '', 'id' => '', 'title' => 'Lehrbuch der Botanik / Strasburger, Eduard (2008)', 'feeid' => null, 'about' => 'Lehrbuch der Botanik / Strasburger, Eduard (2008)', 'item' => 'http://uri.gbv.de/document/opac-de-830:bar:830$26461872']]
$holdsTestResult
protected
mixed
$holdsTestResult
= [0 => ['item_id' => 'http://uri.gbv.de/document/opac-de-830:bar:830$34096983', 'cancel_details' => '', 'id' => 'http://uri.gbv.de/document/opac-de-830:ppn:040445623', 'type' => 'provided', 'location' => 'Test-Theke', 'position' => 0, 'available' => true, 'title' => 'Praktikum über Entwurf und Manipulation von Datenbanken : SQL/DS (IBM), UDS ' . '(Siemens) und MEMODAX / Vossen, Gottfried (1986)', 'callnumber' => '34:3409-6983', 'create' => '06-17-2016', 'expire' => ''], 1 => ['item_id' => 'http://uri.gbv.de/document/opac-de-830:bar:830$28295402', 'cancel_details' => 'http://uri.gbv.de/document/opac-de-830:bar:830$28295402', 'id' => 'http://uri.gbv.de/document/opac-de-830:ppn:391260316', 'type' => 'reserved', 'location' => 'Ausleihe', 'position' => 0, 'available' => false, 'title' => 'Open source licensing : software freedom and intellectual property law ; ' . '[open source licensees are free to: use open source software for any purpose, make and' . ' distribute copies, create and distribute derivative works, access and use the source code, ' . 'com / Rosen, Lawrence (c 2005)', 'callnumber' => '28:2829-5402', 'create' => '06-15-2016', 'duedate' => '06-15-2016']]
$patron
protected
mixed
$patron
= ['id' => '08301001001', 'firstname' => 'Susan Q.', 'lastname' => 'Nothing', 'email' => 'nobody@vufind.org', 'major' => null, 'college' => null, 'name' => ' Susan Q. Nothing', 'expires' => '9999-12-31', 'status' => 0, 'address' => 'No street at all 8, D-21073 Hamburg', 'type' => [0 => 'de-830:user-type:2'], 'cat_username' => '08301001001', 'cat_password' => 'NOPASSWORD']
$patron_bad
protected
mixed
$patron_bad
= ['id' => '08301001011', 'firstname' => 'Invalid', 'lastname' => 'Nobody', 'email' => 'nobody_invalid@vufind.org', 'major' => null, 'college' => null, 'name' => ' Nobody Nothing', 'expires' => '9999-12-31', 'status' => 9, 'address' => 'No street at all 8, D-21073 Hamburg', 'type' => [0 => 'de-830:user-type:2'], 'cat_username' => '08301001011', 'cat_password' => 'NOPASSWORD']
$patron_expired
protected
mixed
$patron_expired
= ['id' => '08301001111', 'firstname' => 'Expired', 'lastname' => 'Nobody', 'email' => 'nobody_expired@vufind.org', 'major' => null, 'college' => null, 'name' => ' Nobody Nothing', 'expires' => '2015-12-31', 'status' => 0, 'address' => 'No street at all 8, D-21073 Hamburg', 'type' => [0 => 'de-830:user-type:2'], 'cat_username' => '08301001111', 'cat_password' => 'NOPASSWORD']
$profileTestResult
protected
mixed
$profileTestResult
= ['firstname' => 'Susan Q.', 'lastname' => 'Nothing', 'address1' => 'No street at all 8, D-21073 Hamburg', 'address2' => null, 'city' => null, 'country' => null, 'zip' => null, 'phone' => null, 'group' => 'de-830:user-type:2', 'mobile_phone' => null, 'expires' => '12-31-9999', 'statuscode' => 0, 'canWrite' => true]
$pwchangeTestResult
protected
mixed
$pwchangeTestResult
= ['success' => true, 'status' => 'Successfully changed']
$renewTestResult
protected
mixed
$renewTestResult
= ['blocks' => false, 'details' => ['http://uri.gbv.de/document/opac-de-830:bar:830$22061137' => ['success' => true, 'new_date' => '07-18-2016', 'item_id' => 0, 'sysMessage' => 'Successfully renewed']]]
$requestsTestResult
protected
mixed
$requestsTestResult
= [0 => ['item_id' => 'http://uri.gbv.de/document/opac-de-830:bar:830$24260127', 'cancel_details' => '', 'id' => 'http://uri.gbv.de/document/opac-de-830:ppn:020966334', 'type' => 'ordered', 'location' => 'Ausleihe', 'position' => 0, 'available' => false, 'title' => 'Gold / Kettell, Brian (1982)', 'callnumber' => '24:2426-0127', 'create' => '04-25-2016']]
$storageRetrievalTestResult
protected
mixed
$storageRetrievalTestResult
= ['success' => true, 'sysMessage' => 'Successfully requested']
$transactionsTestResult
protected
mixed
$transactionsTestResult
= [0 => ['item_id' => 'http://uri.gbv.de/document/opac-de-830:bar:830$28342436', 'id' => 'http://uri.gbv.de/document/opac-de-830:ppn:58891861X', 'title' => 'Theoretische Informatik : mit 22 Tabellen und 78 Aufgaben / Hoffmann, Dirk W. (2009)', 'callnumber' => '28:2834-2436', 'renewable' => false, 'renew_details' => '', 'request' => 0, 'renew' => 12, 'reminder' => 1, 'startTime' => '11-15-2013', 'dueTime' => '06-15-2016', 'duedate' => '', 'message' => '', 'borrowingLocation' => 'Ausleihe', 'type' => 'held', 'location' => 'Ausleihe', 'position' => 0, 'available' => false, 'create' => '11-15-2013', 'cancel_details' => ''], 1 => ['renewable' => false, 'item_id' => 'http://uri.gbv.de/document/opac-de-830:bar:830$22278001', 'renew_details' => '', 'id' => 'http://uri.gbv.de/document/opac-de-830:ppn:659228084', 'title' => 'Linked Open Library Data : bibliographische Daten und ihre Zugänglichkeit im Web der' . ' Daten ; Innovationspreis 2011 / Fürste, Fabian M. (2011)', 'request' => 0, 'renew' => 9, 'reminder' => 0, 'startTime' => '12-22-2011', 'dueTime' => '07-14-2016', 'duedate' => '', 'message' => '', 'borrowingLocation' => 'Ausleihe', 'callnumber' => '22:2227-8001', 'type' => 'held', 'location' => 'Ausleihe', 'position' => 0, 'available' => false, 'create' => '12-22-2011', 'cancel_details' => '']]
$validConfig
protected
mixed
$validConfig
= ['DAIA' => ['baseUrl' => 'http://daia.gbv.de/'], 'PAIA' => ['baseUrl' => 'http://paia.gbv.de/', 'grantType' => 'password', 'accountBlockNotificationsForMissingScopes' => ['update_patron' => 'ILSMessages::no_update_patron_scope', 'read_notifications' => 'ILSMessages::no_read_notifications_scope']]]
Methods
setUp()
Standard setup method.
public
setUp() : void
Return values
void —testChangePassword()
Test
public
testChangePassword() : void
Return values
void —testFees()
Test
public
testFees() : void
Return values
void —testGetAccountBlocks()
Test getAccountBlocks
public
testGetAccountBlocks() : void
Return values
void —testHolds()
Test
public
testHolds() : void
Return values
void —testMissingConfiguration()
Test that driver complains about missing configuration.
public
testMissingConfiguration() : void
Return values
void —testPlaceHold()
Test
public
testPlaceHold() : void
Return values
void —testPlaceStorageRetrievalRequest()
Test
public
testPlaceStorageRetrievalRequest() : void
Return values
void —testProfile()
Test
public
testProfile() : void
Return values
void —testRenew()
Test
public
testRenew() : void
Return values
void —testRenewDetails()
Test
public
testRenewDetails() : void
Return values
void —testRequests()
Test
public
testRequests() : void
Return values
void —testTransactions()
Test
public
testTransactions() : void
Return values
void —testValidRequest()
Test
public
testValidRequest() : 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 —createMockConnector()
Create connector with fixture file.
protected
createMockConnector([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 —getHttpService()
Create HTTP service for testing.
protected
getHttpService([string $fixture = null ]) : HttpService
Parameters
- $fixture : string = null
-
Fixture file
Tags
Return values
HttpService —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.