VuFind API Documentation

ErrorListenerTest extends TestCase
in package
Uses FixtureTrait, MockSearchCommandTrait

Unit tests for SOLR 3.x error listener.

Tags
category

VuFind

author

David Maus maus@hab.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Table of Contents

testDetectParseError()  : void
Detect parser error response.
testDetectUndefinedFieldError()  : void
Detect parser error response.
createResponse()  : Response
Return response fixture
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).
getMockSearchCommand()  : AbstractBase
Get a mock search command.

Methods

testDetectParseError()

Detect parser error response.

public testDetectParseError() : void
Return values
void

testDetectUndefinedFieldError()

Detect parser error response.

public testDetectUndefinedFieldError() : void
Return values
void

createResponse()

Return response fixture

protected createResponse(string $name) : Response
Parameters
$name : string

Name of fixture

Return values
Response

Response

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
throws
RuntimeException
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
throws
RuntimeException
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>

getMockSearchCommand()

Get a mock search command.

protected getMockSearchCommand([ParamBag $params = null ][, mixed $context = null ][, string $backendId = 'foo' ][, mixed $result = null ]) : AbstractBase
Parameters
$params : ParamBag = null

Parameters for command to return

$context : mixed = null

Context for command to return

$backendId : string = 'foo'

Backend ID for command

$result : mixed = null

Result to return

Return values
AbstractBase

Search results