JopTest
extends TestCase
in package
Uses
FixtureTrait
Jop resolver driver test
Tags
Table of Contents
- $openUrlConfig : array<string|int, mixed>
- Test-Config
- testDowngradeOpenUrl() : void
- Test implicit downgrade of open url
- testDowngradeOpenUrlWithoutMappingKey() : void
- Test implicit call of downgradeOpenUrl
- testGetResolverUrl() : void
- Test URL generation
- testParseLinks() : void
- Test link parsing
- 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
$openUrlConfig
Test-Config
protected
array<string|int, mixed>
$openUrlConfig
= ['OpenURL' => ['url' => 'http://services.d-nb.de/fize-service/gvr/full.xml', 'rfr_id' => 'www.ub.uni-leipzig.de', 'resolver' => 'jop', 'window_settings' => 'toolbar=no,location=no,directories=no,buttons=no,status=no,' . 'menubar=no,scrollbars=yes,resizable=yes,width=550,height=600', 'show_in_results' => false, 'show_in_record' => false, 'show_in_holdings' => true, 'embed' => true, 'replace_other_urls' => true]]
Methods
testDowngradeOpenUrl()
Test implicit downgrade of open url
public
testDowngradeOpenUrl() : void
Return values
void —testDowngradeOpenUrlWithoutMappingKey()
Test implicit call of downgradeOpenUrl
public
testDowngradeOpenUrlWithoutMappingKey() : void
Return values
void —testGetResolverUrl()
Test URL generation
public
testGetResolverUrl() : void
Return values
void —testParseLinks()
Test link parsing
public
testParseLinks() : void
Return values
void —createConnector()
Create connector with fixture file.
protected
createConnector([string $fixture = null ][, string $ipAddr = '127.0.0.1' ]) : Connector
Parameters
- $fixture : string = null
-
Fixture file
- $ipAddr : string = '127.0.0.1'
-
Source IP address to simulate
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.