QueryAdapterTest
extends TestCase
in package
Uses
FixtureTrait
QueryAdapter unit tests.
Tags
Table of Contents
- conversionsProvider() : array<string|int, mixed>
- Data provider for testConversions
- testAdvancedRequest() : void
- Test building an advanced query from a request.
- testConversions() : void
- Test various conversions.
- testDisplay() : void
- Test display capabilities.
- testEmptyRequest() : void
- Test building an advanced query from an empty request.
- testOperatorDefinedEverywhere() : void
- Test that when one part of the query contains an operator, ALL parts of the query contain an operator. (We want to be sure that in cases where the first part of the query has no operator associated with it, a blank value is filled in as a placeholder.
- 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).
- getQueryAdapter() : QueryAdapterInterface
- Create a query adapter
Methods
conversionsProvider()
Data provider for testConversions
public
static conversionsProvider() : array<string|int, mixed>
Return values
array<string|int, mixed> —testAdvancedRequest()
Test building an advanced query from a request.
public
testAdvancedRequest() : void
Return values
void —testConversions()
Test various conversions.
public
testConversions(string $type, bool $legacy) : void
Parameters
- $type : string
-
Search type
- $legacy : bool
-
Whether to test legacy version deminification
Tags
Return values
void —testDisplay()
Test display capabilities.
public
testDisplay() : void
Return values
void —testEmptyRequest()
Test building an advanced query from an empty request.
public
testEmptyRequest() : void
Return values
void —testOperatorDefinedEverywhere()
Test that when one part of the query contains an operator, ALL parts of the query contain an operator. (We want to be sure that in cases where the first part of the query has no operator associated with it, a blank value is filled in as a placeholder.
public
testOperatorDefinedEverywhere() : void
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> —getQueryAdapter()
Create a query adapter
protected
getQueryAdapter() : QueryAdapterInterface