ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SelectInputTest Class Reference
+ Inheritance diagram for SelectInputTest:
+ Collaboration diagram for SelectInputTest:

Public Member Functions

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

Detailed Description

Definition at line 15 of file SelectTest.php.

Member Function Documentation

◆ testEmptyStringIsAcceptableClientSideValueIfSelectIsNotRequired()

SelectInputTest::testEmptyStringIsAcceptableClientSideValueIfSelectIsNotRequired ( )

Definition at line 35 of file SelectTest.php.

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

References PHPMailer\PHPMailer\$options.

◆ testEmptyStringIsNoAcceptableClientSideValueIfSelectIsRequired()

SelectInputTest::testEmptyStringIsNoAcceptableClientSideValueIfSelectIsRequired ( )

Definition at line 50 of file SelectTest.php.

51 {
52 $options = [];
53 $select = (new SelectForTest(
54 $this->createMock(ILIAS\Data\Factory::class),
55 $this->createMock(ILIAS\Validation\Factory::class),
56 $this->createMock(ILIAS\Transformation\Factory::class),
57 "",
59 ""
60 ))->withRequired(true);
61
62 $this->assertTrue($select->_isClientSideValueOk(""));
63 }

References PHPMailer\PHPMailer\$options.

◆ 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\Validation\Factory::class),
23 $this->createMock(ILIAS\Transformation\Factory::class),
24 "",
26 ""
27 );
28
29 $this->assertTrue($select->_isClientSideValueOk("one"));
30 $this->assertTrue($select->_isClientSideValueOk("two"));
31 $this->assertTrue($select->_isClientSideValueOk("three"));
32 $this->assertFalse($select->_isClientSideValueOk("four"));
33 }

References PHPMailer\PHPMailer\$options.


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