UrlQueryHelperTest
extends TestCase
in package
Uses
FixtureTrait
UrlQueryHelper unit tests.
Tags
Table of Contents
- testAdvancedSearch() : void
- Test advanced search param building.
- testBasicGetters() : void
- Test the basic functionality of the helper.
- testFacetsAndFilters() : void
- Test adding/removing facets and filters
- testFactory() : void
- Test that the factory does its job properly.
- testQuerySuppression() : void
- Test query suppression.
- testReplacingQueryTerms() : void
- Test replacing query terms
- testSetDefaultParameters() : void
- Test the behavior of setDefaultParameters
- testStackingSetters() : void
- Test stacking setters
- getFixture() : string
- Load a fixture file.
- getFixtureDir() : string
- Get the base directory containing fixtures.
- getFixturePath() : string
- Resolve fixture path.
- getHelper() : UrlQueryHelper
- Get a preconfigured helper.
- getJsonFixture() : array<string|int, mixed>
- Load a JSON fixture from file (using associative array return type).
Methods
testAdvancedSearch()
Test advanced search param building.
public
testAdvancedSearch() : void
Return values
void —testBasicGetters()
Test the basic functionality of the helper.
public
testBasicGetters() : void
Return values
void —testFacetsAndFilters()
Test adding/removing facets and filters
public
testFacetsAndFilters() : void
Return values
void —testFactory()
Test that the factory does its job properly.
public
testFactory() : void
Return values
void —testQuerySuppression()
Test query suppression.
public
testQuerySuppression() : void
Return values
void —testReplacingQueryTerms()
Test replacing query terms
public
testReplacingQueryTerms() : void
Return values
void —testSetDefaultParameters()
Test the behavior of setDefaultParameters
public
testSetDefaultParameters() : void
Return values
void —testStackingSetters()
Test stacking setters
public
testStackingSetters() : 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 —getHelper()
Get a preconfigured helper.
protected
getHelper([array<string|int, mixed> $request = ['foo' => 'bar'] ][, Query $query = null ]) : UrlQueryHelper
Parameters
- $request : array<string|int, mixed> = ['foo' => 'bar']
-
Request parameters
- $query : Query = null
-
Query object
Return values
UrlQueryHelper —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.