XCNCIP2Test
extends ILSDriverTestCase
in package
Uses
FixtureTrait
ILS driver test
Tags
Table of Contents
- $accountBlocksTests : array<string|int, mixed>
- Test definitions for getAccountBlocks tests
- $cancelHoldsTests : array<string|int, array<string|int, mixed>>
- Test definition for testCancelHolds
- $cancelStorageRetrievalTests : array<string|int, array<string|int, mixed>>
- Test definition for testCancelStorageRetrievalRequests
- $driver : AbstractBase
- ILS driver
- $finesTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetMyFines
- $holdingTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetHolding
- $holdsTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetMyHolds
- $loginTests : array<string|int, array<string|int, mixed>>
- Test definition for testPatronLogin
- $notRenewableTransactionsTests : mixed
- $patronBlocksTests : array<string|int, mixed>
- Test definitions for getPatronBlocks tests
- $placeHoldTests : array<string|int, array<string|int, mixed>>
- Test definition for testPlaceHold
- $placeStorageRetrievalRequestTests : array<string|int, array<string|int, mixed>>
- Test definition for testPlaceStorageRetrievalRequest
- $profileTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetMyProfile
- $renewMyItemsTests : array<string|int, array<string|int, mixed>>
- Test definition for testRenewMyItems
- $renewMyItemsWithDisabledRenewals : array<string|int, mixed>
- Test definitions for renewing when renewals are disabled
- $requestTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetRequestMethods
- $statusesTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetStatuses
- $storageRetrievalTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetMyStorageRetrievalRequests
- $transactionsTests : array<string|int, array<string|int, mixed>>
- Test definition for testGetMyTransactions
- setUp() : void
- Standard setup method.
- testAcceptOtherHttpStastusCodes() : void
- Test other accepted HTTP status code configuration
- testCancelHolds() : void
- Test cancelHolds
- testCancelStorageRetrievalRequests() : void
- Test cancelHolds
- testDisableRenewalsConfiguration() : void
- Test disable renewals configuration
- testGetAccountBlocks() : void
- Test method getPatronBlocks
- testGetBib() : void
- Test getBib method
- testGetCancelRequestException() : void
- Test that getCancelRequest throws exception without mandatory parameters (itemId or requestId)
- testGetHolding() : void
- Test getHolding
- testGetMyFines() : void
- Test getMyFines
- testGetMyHolds() : void
- Test getMyHolds
- testGetMyProfile() : void
- Test getMyProfile
- testGetMyStorageRetrievalRequests() : void
- Test getMyStorageRetrievalRequests
- testGetMyTransactions() : void
- Test getMyTransactions
- testGetPatronBlocks() : void
- Test method getPatronBlocks
- testGetPickupLocations() : void
- Test getPickUpLocations
- testGetRequestMethods() : void
- Test methods for creating NCIP requests
- testGetStatuses() : void
- Test getStatuses
- testInitDriver() : void
- Test init method
- testInvalidateResponseCache() : void
- Test invalidateResponseCache
- testIsPatronBlocked() : void
- Test method for isPatronBlocked
- testMissingConfiguration() : void
- Test that driver complains about missing configuration.
- testParseProblem() : void
- Test parse problem method
- testPatronLogin() : void
- Test patronLogin
- testPlaceHold() : void
- Test placeHold
- testPlaceStorageRetrievalRequest() : void
- Test placeStorageRetrievalRequest
- testRenewMyItems() : void
- Test renewMyItems
- configureDriver() : void
- Configure driver for test case
- 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).
- loadResponse() : Response
- Load response from file
- mockResponse() : void
- Mock fixture as HTTP client response
Properties
$accountBlocksTests
Test definitions for getAccountBlocks tests
protected
array<string|int, mixed>
$accountBlocksTests
= [['file' => 'lookupUserResponse.xml', 'result' => false], ['file' => 'lookupUserResponseWithAllBlocks.xml', 'result' => ['requests_blocked', 'renewal_block', 'checkout_block', 'electronic_resources_block', 'lost_card', 'message_from_library', 'available_for_pickup_notification']]]
$cancelHoldsTests
Test definition for testCancelHolds
protected
array<string|int, array<string|int, mixed>>
$cancelHoldsTests
= [['file' => 'CancelRequestItemResponseAccepted.xml', 'result' => ['count' => 1, 'items' => ['Item1' => ['success' => true, 'status' => 'hold_cancel_success']]]], ['file' => 'CancelRequestItemResponseDenied.xml', 'result' => ['count' => 0, 'items' => ['Item1' => ['success' => false, 'status' => 'hold_cancel_fail']]]], ['file' => 'CancelRequestItemResponseDeniedWithUserId.xml', 'result' => ['count' => 0, 'items' => ['Item1' => ['success' => false, 'status' => 'hold_cancel_fail']]]]]
$cancelStorageRetrievalTests
Test definition for testCancelStorageRetrievalRequests
protected
array<string|int, array<string|int, mixed>>
$cancelStorageRetrievalTests
= [['file' => 'CancelRequestItemResponseAccepted.xml', 'result' => ['count' => 1, 'items' => ['Item1' => ['success' => true, 'status' => 'storage_retrieval_request_cancel_success']]]], ['file' => 'CancelRequestItemResponseDenied.xml', 'result' => ['count' => 0, 'items' => ['Item1' => ['success' => false, 'status' => 'storage_retrieval_request_cancel_fail']]]], ['file' => 'CancelRequestItemResponseDeniedWithUserId.xml', 'result' => ['count' => 0, 'items' => ['Item1' => ['success' => false, 'status' => 'storage_retrieval_request_cancel_fail']]]]]
$driver
ILS driver
protected
AbstractBase
$driver
$finesTests
Test definition for testGetMyFines
protected
array<string|int, array<string|int, mixed>>
$finesTests
= [['file' => 'lookupUserResponse.xml', 'result' => [['id' => '8071750247', 'duedate' => '', 'amount' => 25, 'balance' => 25, 'checkout' => '', 'fine' => 'Service Charge', 'createdate' => '11-14-2014']]], ['file' => 'LookupUserResponseWithoutNamespacePrefix.xml', 'result' => [['id' => '', 'duedate' => '', 'amount' => 25, 'balance' => 25, 'checkout' => '', 'fine' => 'Service Charge', 'createdate' => '11-14-2014']]]]
$holdingTests
Test definition for testGetHolding
protected
array<string|int, array<string|int, mixed>>
$holdingTests
= [['file' => 'lookupItemSet.xml', 'result' => [['status' => 'Not For Loan', 'location' => null, 'callnumber' => '621.3 ANG', 'availability' => false, 'reserve' => 'N', 'id' => '123456', 'item_id' => 'MZK01000000421-MZK50000000421000010', 'bib_id' => 'MZK01000000421', 'duedate' => '', 'volume' => '', 'number' => '', 'is_holdable' => false, 'addLink' => false, 'storageRetrievalRequest' => 'auto', 'addStorageRetrievalRequestLink' => 'true', 'eresource' => '', 'item_agency_id' => 'My university', 'holdtype' => 'Recall', 'barcode' => 'MZK01000000421-MZK50000000421000010'], ['status' => 'Available On Shelf', 'location' => null, 'callnumber' => 'PK-0083.568', 'availability' => true, 'reserve' => 'N', 'id' => '123456', 'bib_id' => 'MZK01000062021', 'item_id' => 'MZK01000062021-MZK50000062021000010', 'item_agency_id' => 'Test agency', 'duedate' => '12-08-2019', 'volume' => '', 'number' => '', 'barcode' => 'Unknown barcode', 'is_holdable' => true, 'addLink' => true, 'holdtype' => 'Hold', 'storageRetrievalRequest' => 'auto', 'addStorageRetrievalRequestLink' => 'true', 'eresource' => ''], ['status' => 'In Library Use Only', 'location' => 'Some holding location', 'callnumber' => '2-0997.767,2', 'availability' => false, 'reserve' => 'N', 'id' => '123456', 'item_id' => 'MZK01000000425-MZK50000000425000020', 'bib_id' => 'MZK01000000425', 'item_agency_id' => 'Test agency', 'duedate' => '', 'volume' => '', 'number' => '', 'barcode' => 'Unknown barcode', 'is_holdable' => true, 'addLink' => true, 'holdtype' => 'Recall', 'storageRetrievalRequest' => 'auto', 'addStorageRetrievalRequestLink' => 'true', 'eresource' => '', 'collection_desc' => 'Some holding sublocation'], ['status' => 'Circulation Status Undefined', 'location' => 'Some holding location', 'callnumber' => '', 'availability' => false, 'reserve' => 'N', 'id' => '123456', 'use_unknown_message' => true, 'item_id' => 'MZK01000000425-MZK50000000425000030', 'bib_id' => 'MZK01000000425', 'item_agency_id' => 'Test agency', 'duedate' => '09-14-2020', 'volume' => '', 'number' => '', 'barcode' => 'Unknown barcode', 'is_holdable' => false, 'addLink' => false, 'holdtype' => 'Recall', 'storageRetrievalRequest' => 'auto', 'addStorageRetrievalRequestLink' => 'true', 'eresource' => '', 'collection_desc' => 'Some holding sublocation']]]]
$holdsTests
Test definition for testGetMyHolds
protected
array<string|int, array<string|int, mixed>>
$holdsTests
= [['file' => 'lookupUserResponse.xml', 'result' => [['id' => '111', 'title' => 'Ahoj, Blanko! : dívčí román / Eva Bernardinová', 'item_id' => 'MZK01000353880-MZK50000353880000040', 'create' => '10-10-2014', 'expire' => null, 'position' => null, 'requestId' => null, 'location' => 'Loan Department - Ground floor', 'item_agency_id' => null, 'canceled' => false, 'available' => false], ['id' => '112', 'title' => 'Aktiv revizních techniků elektrických zařízení', 'item_id' => 'MZK01000065021-MZK50000065021000010', 'create' => '10-23-2014', 'expire' => null, 'position' => null, 'requestId' => null, 'location' => 'Loan Department - Ground floor', 'item_agency_id' => null, 'canceled' => false, 'available' => false]]], ['file' => 'LookupUserResponseWithoutNamespacePrefix.xml', 'result' => [['id' => '111', 'title' => 'Ahoj, Blanko! : dívčí román / Eva Bernardinová', 'item_id' => 'MZK01000353880-MZK50000353880000040', 'create' => '10-10-2014', 'expire' => null, 'position' => null, 'requestId' => null, 'location' => 'Loan Department - Ground floor', 'item_agency_id' => null, 'canceled' => false, 'available' => false], ['id' => '112', 'title' => 'Aktiv revizních techniků elektrických zařízení', 'item_id' => 'MZK01000065021-MZK50000065021000010', 'create' => '10-23-2014', 'expire' => null, 'position' => null, 'requestId' => null, 'location' => 'Loan Department - Ground floor', 'item_agency_id' => null, 'canceled' => false, 'available' => false]]]]
$loginTests
Test definition for testPatronLogin
protected
array<string|int, array<string|int, mixed>>
$loginTests
= [['file' => 'lookupUserResponse.xml', 'result' => ['id' => '700', 'patronAgencyId' => 'MZK', 'cat_username' => 'my_login', 'cat_password' => 'my_password', 'email' => 'test@mzk.cz', 'major' => null, 'college' => null, 'firstname' => 'John', 'lastname' => 'Smith']], ['file' => 'LookupUserResponseWithoutNamespacePrefix.xml', 'result' => ['id' => '700', 'patronAgencyId' => 'MZK', 'cat_username' => 'my_login', 'cat_password' => 'my_password', 'email' => 'test@mzk.cz', 'major' => null, 'college' => null, 'firstname' => 'John', 'lastname' => 'Smith']]]
$notRenewableTransactionsTests
protected
mixed
$notRenewableTransactionsTests
= [['file' => ['lookupUserResponse.xml', 'LookupItem.xml'], 'result' => [['id' => 'MZK01000847602-MZK50000847602000090', 'item_agency_id' => 'My Agency', 'patronAgencyId' => 'Test agency', 'duedate' => '11-19-2014', 'title' => 'Jahrbücher der Deutschen Malakozoologischen Gesellschaft ...', 'item_id' => '104', 'renewable' => false], ['id' => 'KN3183000000046386', 'item_agency_id' => 'Agency from lookup item', 'patronAgencyId' => 'Test agency', 'duedate' => '11-26-2014', 'title' => 'Anna Nahowská a císař František Josef : zápisky / Friedrich Saathen ; ' . 'z něm. přel. Ivana Víz', 'item_id' => '105', 'renewable' => false]]]]
$patronBlocksTests
Test definitions for getPatronBlocks tests
protected
array<string|int, mixed>
$patronBlocksTests
= [['file' => 'lookupUserResponse.xml', 'result' => []], ['file' => 'lookupUserResponseWithBlocks.xml', 'result' => ['Block Request Item', 'Block Renewal']]]
$placeHoldTests
Test definition for testPlaceHold
protected
array<string|int, array<string|int, mixed>>
$placeHoldTests
= [['file' => 'RequestItemResponseAcceptedWithItemId.xml', 'result' => ['success' => true]], ['file' => 'RequestItemResponseAcceptedWithRequestId.xml', 'result' => ['success' => true]], ['file' => 'RequestItemResponseDenied.xml', 'result' => ['success' => false, 'sysMessage' => 'Temporary Processing Failure']], ['file' => 'RequestItemResponseDeniedWithIdentifiers.xml', 'result' => ['success' => false, 'sysMessage' => 'Temporary Processing Failure']], ['file' => 'RequestItemResponseDeniedNotFullProblemElement.xml', 'result' => ['success' => false, 'sysMessage' => 'User Blocked']], ['file' => 'RequestItemResponseDeniedEmpty.xml', 'result' => ['success' => false]]]
$placeStorageRetrievalRequestTests
Test definition for testPlaceStorageRetrievalRequest
protected
array<string|int, array<string|int, mixed>>
$placeStorageRetrievalRequestTests
= [['file' => 'RequestItemResponseAcceptedWithItemId.xml', 'result' => ['success' => true]], ['file' => 'RequestItemResponseAcceptedWithRequestId.xml', 'result' => ['success' => true]], ['file' => 'RequestItemResponseDenied.xml', 'result' => ['success' => false, 'sysMessage' => 'Temporary Processing Failure']], ['file' => 'RequestItemResponseDeniedWithIdentifiers.xml', 'result' => ['success' => false, 'sysMessage' => 'Temporary Processing Failure']], ['file' => 'RequestItemResponseDeniedNotFullProblemElement.xml', 'result' => ['success' => false, 'sysMessage' => 'User Blocked']], ['file' => 'RequestItemResponseDeniedEmpty.xml', 'result' => ['success' => false]]]
$profileTests
Test definition for testGetMyProfile
protected
array<string|int, array<string|int, mixed>>
$profileTests
= [['file' => 'lookupUserResponse.xml', 'result' => ['firstname' => 'John', 'lastname' => 'Smith', 'address1' => 'Trvalá ulice 123, Big City, 12345', 'address2' => '', 'zip' => '', 'phone' => '', 'group' => '', 'expiration_date' => '12-30-2099']], ['file' => 'LookupUserResponseWithoutNamespacePrefix.xml', 'result' => ['firstname' => 'John', 'lastname' => 'Smith', 'address1' => 'Trvalá ulice 123, Big City, 12345', 'address2' => '', 'zip' => '', 'phone' => '', 'group' => '', 'expiration_date' => '12-30-2099']], ['file' => 'lookupUserResponseStructuredAddress.xml', 'result' => ['firstname' => 'John', 'lastname' => 'Smith', 'address1' => 'Trvalá ulice 123', 'address2' => '12345 Big City', 'zip' => '', 'phone' => '', 'group' => '', 'expiration_date' => '12-30-2099']], ['file' => 'lookupUserResponseStructuredAddressDetail.xml', 'result' => ['firstname' => 'John', 'lastname' => 'Smith', 'address1' => 'Trvalá ulice 123', 'address2' => 'Big City', 'zip' => '12345', 'phone' => '', 'group' => '', 'expiration_date' => '12-30-2099']], ['file' => 'lookupUserResponseUnstructuredName.xml', 'result' => ['firstname' => '', 'lastname' => 'John Smith Jr.', 'address1' => 'Trvalá ulice 123', 'address2' => '12345 Big City', 'zip' => '', 'phone' => '', 'group' => '', 'expiration_date' => '12-30-2099']]]
$renewMyItemsTests
Test definition for testRenewMyItems
protected
array<string|int, array<string|int, mixed>>
$renewMyItemsTests
= [['file' => 'RenewItemResponseAccepted.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => true, 'new_date' => '09-08-2020', 'new_time' => '20:00', 'item_id' => 'Item1']]]], ['file' => 'RenewItemResponseAcceptedAlternativeDateFormat.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => true, 'new_date' => '08-31-2020', 'new_time' => '17:59', 'item_id' => 'Item1']]]], ['file' => 'RenewItemResponseDenied.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => false, 'item_id' => 'Item1']]]], ['file' => 'RenewItemResponseDeniedInvalidMessage.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => false, 'item_id' => 'Item1']]]]]
$renewMyItemsWithDisabledRenewals
Test definitions for renewing when renewals are disabled
protected
array<string|int, mixed>
$renewMyItemsWithDisabledRenewals
= [['file' => 'RenewItemResponseAccepted.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => false, 'item_id' => 'Item1']]]], ['file' => 'RenewItemResponseAcceptedAlternativeDateFormat.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => false, 'item_id' => 'Item1']]]], ['file' => 'RenewItemResponseDenied.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => false, 'item_id' => 'Item1']]]], ['file' => 'RenewItemResponseDeniedInvalidMessage.xml', 'result' => ['blocks' => false, 'details' => ['Item1' => ['success' => false, 'item_id' => 'Item1']]]]]
$requestTests
Test definition for testGetRequestMethods
protected
array<string|int, array<string|int, mixed>>
$requestTests
= ['1' => ['method' => 'getStatusRequest', 'config' => ['Catalog' => ['url' => 'https://test.ncip.example', 'consortium' => false, 'agency' => ['Test agency'], 'pickupLocationsFile' => 'XCNCIP2_locations.txt', 'fromAgency' => 'My portal']], 'params' => [['1'], null, 'Test agency'], 'result' => 'LookupItemSetRequest.xml'], '2' => ['method' => 'getStatusRequest', 'params' => [['1'], null, 'Test agency'], 'result' => 'LookupItemSetRequestWithoutHeader.xml'], '3' => ['method' => 'getCancelRequest', 'params' => ['', '', 'patron agency', 'item agency', 'rq1', 'Hold', 'item1', '12345'], 'result' => 'CancelRequestItemRequest.xml'], '4' => ['method' => 'getCancelRequest', 'params' => ['username', 'password', 'patron agency', 'item agency', 'rq1', 'Hold', 'item1', '12345'], 'result' => 'CancelRequestItemRequestAuthInput.xml'], '4.1' => ['method' => 'getCancelRequest', 'config' => ['Catalog' => ['url' => 'https://test.ncip.example', 'consortium' => false, 'agency' => ['default agency'], 'pickupLocationsFile' => 'XCNCIP2_locations.txt', 'fromAgency' => 'My portal']], 'params' => ['username', 'password', 'patron agency', '', 'rq1', 'Hold', 'item1', '12345'], 'result' => 'CancelRequestDefaultItemAgencyRequest.xml'], '5' => ['method' => 'getRenewRequest', 'params' => ['username', 'password', 'item1', 'item agency', 'patron agency'], 'result' => 'RenewItemRequest.xml'], '5.1' => ['method' => 'getRenewRequest', 'config' => ['Catalog' => ['url' => 'https://test.ncip.example', 'consortium' => false, 'agency' => ['default agency'], 'pickupLocationsFile' => 'XCNCIP2_locations.txt', 'fromAgency' => 'My portal']], 'params' => ['username', 'password', 'item1', '', 'patron agency'], 'result' => 'RenewItemDefaultAgencyRequest.xml'], '5.2' => ['method' => 'getRenewRequest', 'params' => ['username', 'password', 'item1', 'item agency', 'patron agency', 'username'], 'result' => 'RenewItemWithUserIdRequest.xml'], '6' => ['method' => 'getRequest', 'config' => ['Catalog' => ['url' => 'https://test.ncip.example', 'consortium' => false, 'agency' => ['Test agency'], 'pickupLocationsFile' => 'XCNCIP2_locations.txt', 'fromAgency' => 'My portal']], 'params' => ['username', '', 'bib1', 'item1', 'patron agency', 'item agency', 'Hold', 'Item', '2020-12-20T00:00:00.000Z', null, 'patron1'], 'result' => 'RequestItemRequest.xml'], '7' => ['method' => 'getLookupUserRequest', 'params' => [null, 'password', 'patron agency', ['<ns1:LoanedItemsDesired />'], 'patron1'], 'result' => 'LookupUserRequest.xml'], '8' => ['method' => 'getLookupAgencyRequest', 'params' => [null], 'result' => 'LookupAgencyRequest.xml'], '9' => ['method' => 'getLookupItemRequest', 'config' => ['Catalog' => ['url' => 'https://test.ncip.example', 'consortium' => false, 'agency' => ['Test agency'], 'pickupLocationsFile' => 'XCNCIP2_locations.txt', 'fromAgency' => 'My portal']], 'params' => ['item1', 'Accession Number'], 'result' => 'LookupItemRequest.xml']]
$statusesTests
Test definition for testGetStatuses
protected
array<string|int, array<string|int, mixed>>
$statusesTests
= [['file' => 'lookupItemSet.xml', 'result' => ['MZK01000000421' => [['status' => 'Available on shelf', 'location' => null, 'callnumber' => '621.3 ANG', 'availability' => true, 'reserve' => 'N', 'id' => 'MZK01000000421']], 'MZK01000062021' => [['status' => 'Available On Shelf', 'location' => null, 'callnumber' => 'PK-0083.568', 'availability' => true, 'reserve' => 'N', 'id' => 'MZK01000062021']], 'MZK01000000425' => [['status' => 'Available On Shelf', 'location' => 'Some holding location', 'callnumber' => '2-0997.767,2', 'availability' => true, 'reserve' => 'N', 'id' => 'MZK01000000425'], ['status' => 'Circulation Status Undefined', 'location' => 'Some holding location', 'callnumber' => null, 'availability' => false, 'reserve' => 'N', 'id' => 'MZK01000000425', 'use_unknown_message' => true]]]], ['file' => 'lookupItemSetWithoutNamespacePrefix.xml', 'result' => ['MZK01000000421' => [['status' => 'Available on shelf', 'location' => null, 'callnumber' => '621.3 ANG', 'availability' => true, 'reserve' => 'N', 'id' => 'MZK01000000421']], 'MZK01000062021' => [['status' => 'Available On Shelf', 'location' => null, 'callnumber' => 'PK-0083.568', 'availability' => true, 'reserve' => 'N', 'id' => 'MZK01000062021']], 'MZK01000000425' => [['status' => 'Available On Shelf', 'location' => 'Some holding location', 'callnumber' => '2-0997.767,2', 'availability' => true, 'reserve' => 'N', 'id' => 'MZK01000000425'], ['status' => 'Available On Shelf', 'location' => 'Some holding location', 'callnumber' => null, 'availability' => true, 'reserve' => 'N', 'id' => 'MZK01000000425']]]]]
$storageRetrievalTests
Test definition for testGetMyStorageRetrievalRequests
protected
array<string|int, array<string|int, mixed>>
$storageRetrievalTests
= [['file' => 'lookupUserResponse.xml', 'result' => [['id' => '155', 'title' => 'Listen and play : with magicians! : 3. ročník / Věra Štiková ; ' . '[ilustrace Andrea Schindlerová]', 'create' => '11-09-2014', 'expire' => null, 'position' => null, 'requestId' => null, 'location' => 'Loan Department - Ground floor', 'item_agency_id' => null, 'canceled' => false, 'item_id' => 'MZK01001333770-MZK50001370317000020', 'available' => false]]], ['file' => 'LookupUserResponseWithoutNamespacePrefix.xml', 'result' => [['id' => '155', 'title' => 'Listen and play : with magicians! : 3. ročník / Věra Štiková ; ' . '[ilustrace Andrea Schindlerová]', 'create' => '11-09-2014', 'expire' => null, 'position' => null, 'requestId' => null, 'location' => 'Loan Department - Ground floor', 'item_agency_id' => null, 'canceled' => false, 'item_id' => 'MZK01001333770-MZK50001370317000020', 'available' => false]]]]
$transactionsTests
Test definition for testGetMyTransactions
protected
array<string|int, array<string|int, mixed>>
$transactionsTests
= [['file' => ['lookupUserResponse.xml', 'LookupItem.xml'], 'result' => [['id' => 'MZK01000847602-MZK50000847602000090', 'item_agency_id' => 'My Agency', 'patronAgencyId' => 'Test agency', 'duedate' => '11-19-2014', 'title' => 'Jahrbücher der Deutschen Malakozoologischen Gesellschaft ...', 'item_id' => '104', 'renewable' => false], ['id' => 'KN3183000000046386', 'item_agency_id' => 'Agency from lookup item', 'patronAgencyId' => 'Test agency', 'duedate' => '11-26-2014', 'title' => 'Anna Nahowská a císař František Josef : zápisky / Friedrich Saathen ; ' . 'z něm. přel. Ivana Víz', 'item_id' => '105', 'renewable' => true]]], ['file' => ['LookupUserResponseWithoutNamespacePrefix.xml'], 'result' => [['id' => 'MZK01000847602-MZK50000847602000090', 'item_agency_id' => 'My Agency', 'patronAgencyId' => 'Test agency', 'duedate' => '11-19-2014', 'title' => 'Jahrbücher der Deutschen Malakozoologischen Gesellschaft ...', 'item_id' => '104', 'renewable' => true], ['id' => 'MZK01000000456-MZK50000000456000440', 'item_agency_id' => 'My Agency', 'patronAgencyId' => 'Test agency', 'duedate' => '11-26-2014', 'title' => 'Anna Nahowská a císař František Josef : zápisky / Friedrich Saathen ; ' . 'z něm. přel. Ivana Víz', 'item_id' => '105', 'renewable' => true]]], ['file' => ['LookupUserResponseWithoutNamespaceDefinition.xml'], 'result' => [['id' => 'MZK01000847602-MZK50000847602000090', 'item_agency_id' => 'My Agency', 'patronAgencyId' => 'Test agency', 'duedate' => '11-19-2014', 'title' => 'Jahrbücher der Deutschen Malakozoologischen Gesellschaft ...', 'item_id' => '104', 'renewable' => true], ['id' => 'MZK01000000456-MZK50000000456000440', 'item_agency_id' => 'My Agency', 'patronAgencyId' => 'Test agency', 'duedate' => '11-26-2014', 'title' => 'Anna Nahowská a císař František Josef : zápisky / Friedrich Saathen ; ' . 'z něm. přel. Ivana Víz', 'item_id' => '105', 'renewable' => true]]]]
Methods
setUp()
Standard setup method.
public
setUp() : void
Return values
void —testAcceptOtherHttpStastusCodes()
Test other accepted HTTP status code configuration
public
testAcceptOtherHttpStastusCodes() : void
Return values
void —testCancelHolds()
Test cancelHolds
public
testCancelHolds() : void
Return values
void —testCancelStorageRetrievalRequests()
Test cancelHolds
public
testCancelStorageRetrievalRequests() : void
Return values
void —testDisableRenewalsConfiguration()
Test disable renewals configuration
public
testDisableRenewalsConfiguration() : void
Return values
void —testGetAccountBlocks()
Test method getPatronBlocks
public
testGetAccountBlocks() : void
Return values
void —testGetBib()
Test getBib method
public
testGetBib() : void
Tags
Return values
void —testGetCancelRequestException()
Test that getCancelRequest throws exception without mandatory parameters (itemId or requestId)
public
testGetCancelRequestException() : void
Return values
void —testGetHolding()
Test getHolding
public
testGetHolding() : void
Return values
void —testGetMyFines()
Test getMyFines
public
testGetMyFines() : void
Return values
void —testGetMyHolds()
Test getMyHolds
public
testGetMyHolds() : void
Return values
void —testGetMyProfile()
Test getMyProfile
public
testGetMyProfile() : void
Return values
void —testGetMyStorageRetrievalRequests()
Test getMyStorageRetrievalRequests
public
testGetMyStorageRetrievalRequests() : void
Return values
void —testGetMyTransactions()
Test getMyTransactions
public
testGetMyTransactions() : void
Return values
void —testGetPatronBlocks()
Test method getPatronBlocks
public
testGetPatronBlocks() : void
Tags
Return values
void —testGetPickupLocations()
Test getPickUpLocations
public
testGetPickupLocations() : void
Return values
void —testGetRequestMethods()
Test methods for creating NCIP requests
public
testGetRequestMethods() : void
Return values
void —testGetStatuses()
Test getStatuses
public
testGetStatuses() : void
Return values
void —testInitDriver()
Test init method
public
testInitDriver() : void
Tags
Return values
void —testInvalidateResponseCache()
Test invalidateResponseCache
public
testInvalidateResponseCache() : void
Tags
Return values
void —testIsPatronBlocked()
Test method for isPatronBlocked
public
testIsPatronBlocked() : void
Tags
Return values
void —testMissingConfiguration()
Test that driver complains about missing configuration.
public
testMissingConfiguration() : void
Return values
void —testParseProblem()
Test parse problem method
public
testParseProblem() : void
Tags
Return values
void —testPatronLogin()
Test patronLogin
public
testPatronLogin() : void
Return values
void —testPlaceHold()
Test placeHold
public
testPlaceHold() : void
Return values
void —testPlaceStorageRetrievalRequest()
Test placeStorageRetrievalRequest
public
testPlaceStorageRetrievalRequest() : void
Return values
void —testRenewMyItems()
Test renewMyItems
public
testRenewMyItems() : void
Return values
void —configureDriver()
Configure driver for test case
protected
configureDriver([array<string|int, mixed>|null $config = null ]) : void
Parameters
- $config : array<string|int, mixed>|null = null
-
ILS driver configuration
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
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.
Return values
array<string|int, mixed> —loadResponse()
Load response from file
protected
loadResponse(string $filename) : Response
Parameters
- $filename : string
-
File name of raw HTTP response
Return values
Response —Response object
mockResponse()
Mock fixture as HTTP client response
protected
mockResponse([string|array<string|int, mixed>|null $fixture = null ]) : void
Parameters
- $fixture : string|array<string|int, mixed>|null = null
-
Fixture file