VuFind API Documentation

AutocompleteTrait

Trait adding autocomplete checking functionality to a Mink test class.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Table of Contents

getAndAssertFirstAutocompleteValue()  : NodeElement
Get an autocomplete item, and assert its value.
assertAutocompleteValueAndReturnItem()  : NodeElement
For the provided search, assert the first autocomplete value and return the associated page element.

Methods

getAndAssertFirstAutocompleteValue()

Get an autocomplete item, and assert its value.

public getAndAssertFirstAutocompleteValue(Element $page, string $text) : NodeElement
Parameters
$page : Element

Page element

$text : string

Expected text

Return values
NodeElement

assertAutocompleteValueAndReturnItem()

For the provided search, assert the first autocomplete value and return the associated page element.

protected assertAutocompleteValueAndReturnItem(Element $page, string $search, string $expected[, string|null $type = null ]) : NodeElement
Parameters
$page : Element

Page to use for searching

$search : string

Search term(s)

$expected : string

First expected Autocomplete suggestion

$type : string|null = null

Search type (null for default)

Return values
NodeElement

Search results