DemoDriverTestTrait
Trait with utility methods for configuring the demo driver in a test
Tags
Table of Contents
- getDemoIniOverrides() : array<string|int, mixed>
- Get Demo.ini override settings for testing ILS functions.
- getFakeHistoricTransactions() : array<string|int, mixed>
- Get historic transaction JSON for Demo.ini.
- getFakeItem() : array<string|int, mixed>
- Get a fake item record for inclusion in the Demo driver configuration.
- getFakeTransactions() : array<string|int, mixed>
- Get transaction JSON for Demo.ini.
- submitCatalogLoginForm() : void
- Fill in and submit the catalog login form with the provided credentials.
Methods
getDemoIniOverrides()
Get Demo.ini override settings for testing ILS functions.
protected
getDemoIniOverrides([string $bibId = 'testsample1' ][, string $bibId2 = 'testsample2' ]) : array<string|int, mixed>
Parameters
- $bibId : string = 'testsample1'
-
Bibliographic record ID to create fake item info for.
- $bibId2 : string = 'testsample2'
-
Bibliographic record ID for a second transaction history row.
Return values
array<string|int, mixed> —getFakeHistoricTransactions()
Get historic transaction JSON for Demo.ini.
protected
getFakeHistoricTransactions(string $bibId, string $bibId2) : array<string|int, mixed>
Parameters
- $bibId : string
-
Bibliographic record ID to create fake item info for.
- $bibId2 : string
-
Another bibliographic record ID to create fake item info for.
Return values
array<string|int, mixed> —getFakeItem()
Get a fake item record for inclusion in the Demo driver configuration.
protected
getFakeItem() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFakeTransactions()
Get transaction JSON for Demo.ini.
protected
getFakeTransactions(string $bibId) : array<string|int, mixed>
Parameters
- $bibId : string
-
Bibliographic record ID to create fake item info for.
Return values
array<string|int, mixed> —submitCatalogLoginForm()
Fill in and submit the catalog login form with the provided credentials.
protected
submitCatalogLoginForm(Element $page, string $username, string $password) : void
Parameters
- $page : Element
-
Page element.
- $username : string
-
Username
- $password : string
-
Password