MediaWiki  master
HTMLAutoCompleteSelectFieldTest Class Reference

HTMLAutoCompleteSelectField. More...

Inheritance diagram for HTMLAutoCompleteSelectFieldTest:
Collaboration diagram for HTMLAutoCompleteSelectFieldTest:

Public Member Functions

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

Public Attributes

 $options
 

Detailed Description

Member Function Documentation

◆ testGetAttributes()

HTMLAutoCompleteSelectFieldTest::testGetAttributes ( )

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

HTMLAutoCompleteSelectField::getAttributes

Definition at line 31 of file HTMLAutoCompleteSelectFieldTest.php.

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

◆ testMissingAutocompletions()

HTMLAutoCompleteSelectFieldTest::testMissingAutocompletions ( )

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 21 of file HTMLAutoCompleteSelectFieldTest.php.

◆ testOptionalSelectElement()

HTMLAutoCompleteSelectFieldTest::testOptionalSelectElement ( )

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

Definition at line 48 of file HTMLAutoCompleteSelectFieldTest.php.

References $html, $options, and $params.

Member Data Documentation

◆ $options

HTMLAutoCompleteSelectFieldTest::$options
Initial value:
= [
'Bulgaria' => 'BGR'

Definition at line 7 of file HTMLAutoCompleteSelectFieldTest.php.

Referenced by testOptionalSelectElement().


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