ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
SelectInputTest Class Reference
+ Inheritance diagram for SelectInputTest:
+ Collaboration diagram for SelectInputTest:

Public Member Functions

 testOnlyValuesFromOptionsAreAcceptableClientSideValues ()
 
 testEmptyStringIsAcceptableClientSideValueIfSelectIsNotRequired ()
 
 testEmptyStringIsAnAcceptableClientSideValueEvenIfSelectIsRequired ()
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getRefinery ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null)
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML ($html)
 
 assertHTMLEquals ($expected_html_as_string, $html_as_string)
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML ($html)
 A more radical version of normalizeHTML. More...
 

Detailed Description

Definition at line 15 of file SelectTest.php.

Member Function Documentation

◆ testEmptyStringIsAcceptableClientSideValueIfSelectIsNotRequired()

SelectInputTest::testEmptyStringIsAcceptableClientSideValueIfSelectIsNotRequired ( )

Definition at line 34 of file SelectTest.php.

35  {
36  $options = [];
37  $select = new SelectForTest(
38  $this->createMock(ILIAS\Data\Factory::class),
39  $this->createMock(ILIAS\Refinery\Factory::class),
40  "",
41  $options,
42  ""
43  );
44 
45  $this->assertTrue($select->_isClientSideValueOk(""));
46  }
Class ChatMainBarProvider .

◆ testEmptyStringIsAnAcceptableClientSideValueEvenIfSelectIsRequired()

SelectInputTest::testEmptyStringIsAnAcceptableClientSideValueEvenIfSelectIsRequired ( )

Definition at line 48 of file SelectTest.php.

References ILIAS\UI\Component\Input\Field\Input\withRequired().

49  {
50  $options = [];
51  $select = (new SelectForTest(
52  $this->createMock(ILIAS\Data\Factory::class),
53  $this->createMock(ILIAS\Refinery\Factory::class),
54  "",
55  $options,
56  ""
57  ))->withRequired(true);
58 
59  $this->assertTrue($select->_isClientSideValueOk(""));
60  }
Class ChatMainBarProvider .
+ Here is the call graph for this function:

◆ testOnlyValuesFromOptionsAreAcceptableClientSideValues()

SelectInputTest::testOnlyValuesFromOptionsAreAcceptableClientSideValues ( )

Definition at line 17 of file SelectTest.php.

18  {
19  $options = ["one" => "Eins", "two" => "Zwei", "three" => "Drei"];
20  $select = new SelectForTest(
21  $this->createMock(ILIAS\Data\Factory::class),
22  $this->createMock(ILIAS\Refinery\Factory::class),
23  "",
24  $options,
25  ""
26  );
27 
28  $this->assertTrue($select->_isClientSideValueOk("one"));
29  $this->assertTrue($select->_isClientSideValueOk("two"));
30  $this->assertTrue($select->_isClientSideValueOk("three"));
31  $this->assertFalse($select->_isClientSideValueOk("four"));
32  }
Class ChatMainBarProvider .

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