Definition at line 31 of file TextareaTest.php.
 
◆ buildFactory()
  
  
      
        
          | TextareaTest::buildFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 40 of file TextareaTest.php.
Referenced by testGetMaxLimit(), testGetMinLimit(), testImplementsFactoryInterface(), testImplementsFactoryInterface_without_byline(), testIsLimited(), testRenderer(), testRendererCounterWithValue(), testRendererWithDisabled(), testRendererWithError(), testRendererWithMaxLimit(), testRendererWithMinAndMaxLimit(), testRendererWithMinLimit(), testStripsTags(), testWithMaxLimit(), and testWithMinLimit().
   40                                      : I\Input\Field\Factory
    42         $df = 
new Data\Factory();
    43         $language = $this->createMock(ilLanguage::class);
    44         return new I\Input\Field\Factory(
 Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ setUp()
◆ testGetMaxLimit()
      
        
          | TextareaTest::testGetMaxLimit  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testGetMinLimit()
      
        
          | TextareaTest::testGetMinLimit  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testImplementsFactoryInterface()
      
        
          | TextareaTest::testImplementsFactoryInterface  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 53 of file TextareaTest.php.
References Vendor\Package\$f, and buildFactory().
   56         $textarea = 
$f->textarea(
"label", 
"byline");
    57         $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $textarea);
    58         $this->assertInstanceOf(Field\Textarea::class, $textarea);
 
Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testImplementsFactoryInterface_without_byline()
      
        
          | TextareaTest::testImplementsFactoryInterface_without_byline  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 61 of file TextareaTest.php.
References Vendor\Package\$f, and buildFactory().
   64         $textarea = 
$f->textarea(
"label");
    65         $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $textarea);
    66         $this->assertInstanceOf(Field\Textarea::class, $textarea);
 
Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testIsLimited()
      
        
          | TextareaTest::testIsLimited  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 89 of file TextareaTest.php.
References Vendor\Package\$f, and buildFactory().
   94         $textarea = 
$f->textarea(
'label')->withMinLimit(5);
    95         $this->assertTrue($textarea->isLimited());
    98         $textarea = 
$f->textarea(
'label')->withMaxLimit(5);
    99         $this->assertTrue($textarea->isLimited());
   102         $textarea = 
$f->textarea(
'label')->withMinLimit(5)->withMaxLimit(20);
   103         $this->assertTrue($textarea->isLimited());
   106         $textarea = 
$f->textarea(
'label');
   107         $this->assertFalse($textarea->isLimited());
 
 
 
 
◆ testRenderer()
      
        
          | TextareaTest::testRenderer  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 127 of file TextareaTest.php.
References Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\assertHTMLEquals(), buildFactory(), ILIAS_UI_TestBase\getDefaultRenderer(), and ILIAS_UI_TestBase\normalizeHTML().
  135         $textarea = 
$f->textarea($label, $byline)->withNameFrom($this->name_source);
   138             <div class=\"form-group row\">   139                 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label>   140                 <div class=\"col-sm-8 col-md-9 col-lg-10\">   141                     <div class=\"ui-input-textarea\">   142                         <textarea id=\"$id\" class=\"form-control form-control-sm\" name=\"$name\"></textarea>   144                     <div class=\"help-block\">$byline</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
normalizeHTML(string $html)
 
 
 
 
◆ testRendererCounterWithValue()
      
        
          | TextareaTest::testRendererCounterWithValue  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 240 of file TextareaTest.php.
References Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\assertHTMLEquals(), buildFactory(), ILIAS_UI_TestBase\getDefaultRenderer(), and ILIAS_UI_TestBase\normalizeHTML().
  248         $value = 
"Lorem ipsum dolor sit";
   249         $textarea = 
$f->textarea($label, $byline)->withValue($value)->withNameFrom($this->name_source);
   252             <div class=\"form-group row\">   253                 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label>   254                 <div class=\"col-sm-8 col-md-9 col-lg-10\">   255                     <div class=\"ui-input-textarea\">   256                         <textarea id=\"$id\" class=\"form-control form-control-sm\" name=\"$name\">$value</textarea>   258                     <div class=\"help-block\">$byline</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
normalizeHTML(string $html)
 
 
 
 
◆ testRendererWithDisabled()
      
        
          | TextareaTest::testRendererWithDisabled  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 296 of file TextareaTest.php.
References Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\assertHTMLEquals(), buildFactory(), ILIAS_UI_TestBase\getDefaultRenderer(), and ILIAS_UI_TestBase\normalizeHTML().
  304         $textarea = 
$f->textarea($label, $byline)->withNameFrom($this->name_source)->withDisabled(
true);
   307             <div class=\"form-group row\">   308                 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label>   309                 <div class=\"col-sm-8 col-md-9 col-lg-10\">   310                     <div class=\"ui-input-textarea\">   311                         <textarea id=\"$id\" class=\"form-control form-control-sm\" name=\"$name\" disabled=\"disabled\"></textarea>   313                     <div class=\"help-block\">$byline</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
normalizeHTML(string $html)
 
 
 
 
◆ testRendererWithError()
      
        
          | TextareaTest::testRendererWithError  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 267 of file TextareaTest.php.
References Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\brutallyTrimHTML(), buildFactory(), and ILIAS_UI_TestBase\getDefaultRenderer().
  275         $byline = 
"This is just a byline Min: " . $min;
   277         $textarea = 
$f->textarea($label, $byline)->withNameFrom($this->name_source)->withError($error);
   280             <div class=\"form-group row\">   281                 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label>   282                 <div class=\"col-sm-8 col-md-9 col-lg-10\">   283                     <div class=\"help-block alert alert-danger\" aria-describedby=\"$id\" role=\"alert\">an_error</div>   284                     <div class=\"ui-input-textarea\">   285                         <textarea id=\"$id\" class=\"form-control form-control-sm\" name=\"$name\"></textarea>   287                     <div class=\"help-block\">$byline</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
 
 
 
◆ testRendererWithMaxLimit()
      
        
          | TextareaTest::testRendererWithMaxLimit  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 181 of file TextareaTest.php.
References Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\assertHTMLEquals(), ILIAS_UI_TestBase\brutallyTrimHTML(), buildFactory(), and ILIAS_UI_TestBase\getDefaultRenderer().
  189         $byline = 
"This is just a byline Max: " . $max;
   190         $textarea = 
$f->textarea($label, $byline)->withMaxLimit($max)->withNameFrom($this->name_source);
   193             <div class=\"form-group row\">   194                 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label>   195                 <div class=\"col-sm-8 col-md-9 col-lg-10\">   196                     <div class=\"ui-input-textarea\">   197                         <textarea id=\"$id\" class=\"form-control form-control-sm\" name=\"$name\" maxlength=\"$max\"></textarea>   198                         <div class=\"ui-input-textarea-remainder\"> ui_chars_remaining <span data-action=\"remainder\">$max</span> </div>   200                     <div class=\"help-block\">$byline</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
 
 
 
◆ testRendererWithMinAndMaxLimit()
      
        
          | TextareaTest::testRendererWithMinAndMaxLimit  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 209 of file TextareaTest.php.
References Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\assertHTMLEquals(), ILIAS_UI_TestBase\brutallyTrimHTML(), buildFactory(), and ILIAS_UI_TestBase\getDefaultRenderer().
  218         $byline = 
"This is just a byline Min: " . $min . 
" Max: " . $max;
   219         $textarea = 
$f->textarea($label, $byline)->withMinLimit($min)->withMaxLimit($max)->withNameFrom(
   224             <div class=\"form-group row\">   225                 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label>   226                 <div class=\"col-sm-8 col-md-9 col-lg-10\">   227                     <div class=\"ui-input-textarea\">   228                         <textarea id=\"$id\" class=\"form-control form-control-sm\" name=\"$name\" minlength=\"5\" maxlength=\"20\"></textarea>   229                         <div class=\"ui-input-textarea-remainder\"> ui_chars_remaining <span data-action=\"remainder\">$max</span> </div>   231                     <div class=\"help-block\">$byline</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
 
 
 
◆ testRendererWithMinLimit()
      
        
          | TextareaTest::testRendererWithMinLimit  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 153 of file TextareaTest.php.
References Vendor\Package\$f, $id, $r, ILIAS_UI_TestBase\assertHTMLEquals(), buildFactory(), ILIAS_UI_TestBase\getDefaultRenderer(), and ILIAS_UI_TestBase\normalizeHTML().
  162         $byline = 
"This is just a byline Min: " . $min;
   163         $textarea = 
$f->textarea($label, $byline)->withMinLimit($min)->withNameFrom($this->name_source);
   166             <div class=\"form-group row\">   167                 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label>   168                 <div class=\"col-sm-8 col-md-9 col-lg-10\">   169                     <div class=\"ui-input-textarea\">   170                         <textarea id=\"$id\" class=\"form-control form-control-sm\" name=\"$name\" minlength=\"$min\"></textarea>   172                     <div class=\"help-block\">$byline</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
normalizeHTML(string $html)
 
 
 
 
◆ testStripsTags()
      
        
          | TextareaTest::testStripsTags  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 322 of file TextareaTest.php.
References Vendor\Package\$f, and buildFactory().
  326         $text = 
$f->textarea(
"")
   327             ->withNameFrom($this->name_source)
   328             ->withInput(
new DefInputData([$name => 
"<script>alert()</script>"]));
   330         $content = $text->getContent();
   331         $this->assertEquals(
"alert()", $content->value());
 
 
 
 
◆ testWithMaxLimit()
      
        
          | TextareaTest::testWithMaxLimit  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 79 of file TextareaTest.php.
References Vendor\Package\$f, and buildFactory().
   83         $textarea = 
$f->textarea(
'label')->withMaxLimit($limit);
    84         $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $textarea);
    85         $this->assertInstanceOf(Field\Textarea::class, $textarea);
    86         $this->assertEquals($textarea->getMaxLimit(), $limit);
 
Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testWithMinLimit()
      
        
          | TextareaTest::testWithMinLimit  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 69 of file TextareaTest.php.
References Vendor\Package\$f, and buildFactory().
   73         $textarea = 
$f->textarea(
'label')->withMinLimit($limit);
    74         $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $textarea);
    75         $this->assertInstanceOf(Field\Textarea::class, $textarea);
    76         $this->assertEquals($textarea->getMinLimit(), $limit);
 
Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ $name_source
The documentation for this class was generated from the following file: