Definition at line 31 of file CheckboxInputTest.php.
 
◆ setUp()
      
        
          | CheckboxInputTest::setUp  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testCommonRendering()
      
        
          | CheckboxInputTest::testCommonRendering  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 94 of file CheckboxInputTest.php.
References Vendor\Package\$f.
   96         $f = $this->getFieldFactory();
    98         $checkbox = 
$f->checkbox($label, null)->withNameFrom($this->name_source);
   100         $this->testWithError($checkbox);
   101         $this->testWithNoByline($checkbox);
   102         $this->testWithRequired($checkbox);
   103         $this->testWithDisabled($checkbox);
   104         $this->testWithAdditionalOnloadCodeRendersId($checkbox);
 
 
 
 
◆ testDisabledContent()
      
        
          | CheckboxInputTest::testDisabledContent  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 145 of file CheckboxInputTest.php.
References Vendor\Package\$f.
  147         $f = $this->getFieldFactory();
   149         $checkbox = 
$f->checkbox($label)
   150             ->withNameFrom($this->name_source)
   153             ->withInput($this->createMock(InputData::class))
   156         $this->assertIsBool($checkbox->getContent()->value());
   157         $this->assertTrue($checkbox->getContent()->value());
 
 
 
 
◆ testFalseContent()
      
        
          | CheckboxInputTest::testFalseContent  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 126 of file CheckboxInputTest.php.
References Vendor\Package\$f.
  128         $f = $this->getFieldFactory();
   130         $checkbox = 
$f->checkbox($label)->withNameFrom($this->name_source);
   132         $input_data = $this->createMock(InputData::class);
   134             ->expects($this->atLeastOnce())
   139         $checkbox_false = $checkbox->withInput($input_data);
   141         $this->assertIsBool($checkbox_false->getContent()->value());
   142         $this->assertFalse($checkbox_false->getContent()->value());
 
 
 
 
◆ testHandleInvalidValue()
      
        
          | CheckboxInputTest::testHandleInvalidValue  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testImplementsFactoryInterface()
      
        
          | CheckboxInputTest::testImplementsFactoryInterface  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 44 of file CheckboxInputTest.php.
References Vendor\Package\$f.
   46         $f = $this->getFieldFactory();
    48         $checkbox = 
$f->checkbox(
"label", 
"byline");
    50         $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $checkbox);
    51         $this->assertInstanceOf(Field\Checkbox::class, $checkbox);
 Interface Observer  Contains several chained tasks and infos about them. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testNullValue()
      
        
          | CheckboxInputTest::testNullValue  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 180 of file CheckboxInputTest.php.
References Vendor\Package\$f.
  182         $f = $this->getFieldFactory();
   183         $checkbox = 
$f->checkbox(
"label");
   184         $checkbox->withValue(null);
   185         $this->assertEquals(
false, $checkbox->getValue());
 
 
 
 
◆ testRender()
      
        
          | CheckboxInputTest::testRender  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 54 of file CheckboxInputTest.php.
References Vendor\Package\$f.
   56         $f = $this->getFieldFactory();
    59         $checkbox = 
$f->checkbox($label, $byline)->withNameFrom($this->name_source);
    60         $expected = $this->getFormWrappedHtml(
    61             'checkbox-field-input',
    63             '<input type="checkbox" id="id_1" value="checked" name="name_0" class="c-field-checkbox" />',
    67         $this->assertEquals($expected, $this->render($checkbox));
 
 
 
 
◆ testRenderValue()
      
        
          | CheckboxInputTest::testRenderValue  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 70 of file CheckboxInputTest.php.
References Vendor\Package\$f.
   72         $f = $this->getFieldFactory();
    75         $checkbox = 
$f->checkbox($label)->withValue($value)->withNameFrom($this->name_source);
    77         $expected = 
'<input type="checkbox" id="id_1" value="checked" checked="checked" name="name_0" class="c-field-checkbox" />';
    78         $this->assertStringContainsString($expected, $this->render($checkbox));
 
 
 
 
◆ testTransformation()
      
        
          | CheckboxInputTest::testTransformation  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 160 of file CheckboxInputTest.php.
References Vendor\Package\$f, and ILIAS\Repository\refinery().
  162         $f = $this->getFieldFactory();
   164         $new_value = 
"NEW_VALUE";
   165         $checkbox = 
$f->checkbox($label)
   166             ->withNameFrom($this->name_source)
   169             ->withAdditionalTransformation($this->
refinery->custom()->transformation(
function ($v) use (&$called, $new_value): 
string {
   173             ->withInput($this->createMock(InputData::class))
   176         $this->assertIsString($checkbox->getContent()->value());
   177         $this->assertEquals($new_value, $checkbox->getContent()->value());
 
 
 
 
◆ testTrueContent()
      
        
          | CheckboxInputTest::testTrueContent  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 107 of file CheckboxInputTest.php.
References Vendor\Package\$f.
  109         $f = $this->getFieldFactory();
   111         $checkbox = 
$f->checkbox($label)->withNameFrom($this->name_source);
   113         $input_data = $this->createMock(InputData::class);
   115             ->expects($this->atLeastOnce())
   118             ->willReturn(
"checked");
   120         $checkbox_true = $checkbox->withInput($input_data);
   122         $this->assertIsBool($checkbox_true->getContent()->value());
   123         $this->assertTrue($checkbox_true->getContent()->value());
 
 
 
 
◆ $name_source
◆ $refinery
  
  
      
        
          | Refinery CheckboxInputTest::$refinery | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: