MediaWiki  REL1_24
HtmlAutoCompleteSelectFieldTest Class Reference

Unit tests for HTMLAutoCompleteSelectField. More...

Inheritance diagram for HtmlAutoCompleteSelectFieldTest:
Collaboration diagram for HtmlAutoCompleteSelectFieldTest:

List of all members.

Public Member Functions

 testGetAttributes ()
 Verify that the autocomplete options are correctly encoded as the 'data-autocomplete' attribute of the field.
 testMissingAutocompletions ()
 Verify that attempting to instantiate an HTMLAutoCompleteSelectField without providing any autocomplete options causes an exception to be thrown.
 testOptionalSelectElement ()
 Test that the optional select dropdown is included or excluded based on the presence or absence of the 'options' parameter.

Public Attributes

 $options

Detailed Description


Member Function Documentation

Verify that the autocomplete options are correctly encoded as the 'data-autocomplete' attribute of the field.

HTMLAutoCompleteSelectField::getAttributes

Definition at line 33 of file HTMLAutoCompleteSelectFieldTest.php.

References array(), FormatJson\decode(), and options().

Verify that attempting to instantiate an HTMLAutoCompleteSelectField without providing any autocomplete options causes an exception to be thrown.

MWException called without any autocompletions

Definition at line 23 of file HTMLAutoCompleteSelectFieldTest.php.

References array().

Test that the optional select dropdown is included or excluded based on the presence or absence of the 'options' parameter.

Definition at line 50 of file HTMLAutoCompleteSelectFieldTest.php.

References $html, $params, array(), and options().


Member Data Documentation

HtmlAutoCompleteSelectFieldTest::$options
Initial value:
 array(
        'Bulgaria'     => 'BGR',
        'Burkina Faso' => 'BFA',
        'Burundi'      => 'BDI',
    )

Definition at line 9 of file HTMLAutoCompleteSelectFieldTest.php.


The documentation for this class was generated from the following file: