Definition at line 55 of file FileInputTest.php.
 
◆ brutallyTrimHTML()
  
  
      
        
          | FileInputTest::brutallyTrimHTML  | 
          ( | 
          string  | 
          $html | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 64 of file FileInputTest.php.
   66         $html = str_replace(
" />", 
"/>", $html);
    67         return parent::brutallyTrimHTML($html);
  
 
 
◆ buildButtonFactory()
  
  
      
        
          | FileInputTest::buildButtonFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ buildFactory()
  
  
      
        
          | FileInputTest::buildFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 70 of file FileInputTest.php.
   70                                      : I\Input\Field\Factory
    72         $df = 
new Data\Factory();
    73         $language = $this->createMock(ilLanguage::class);
    75         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...
 
 
 
 
◆ buildSymbolFactory()
  
  
      
        
          | FileInputTest::buildSymbolFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 506 of file FileInputTest.php.
  508         return new I\Symbol\Factory(
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ getUIFactory()
      
        
          | FileInputTest::getUIFactory  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getUploadHandler()
Definition at line 85 of file FileInputTest.php.
References WithButtonAndSymbolButNoUIFactory\__construct().
   95             public function getFileIdentifierParameterName(): string
   100             public function getUploadURL(): string
   105             public function getFileRemovalURL(): string
   113             public function getExistingFileInfoURL(): string
   121             public function getInfoForExistingFiles(array $file_ids): array
   126             public function getInfoResult(
string $identifier): ?
FileInfoResult   128                 if (null !== $this->file && $identifier === $this->file->getFileIdentifier()) {
   135             public function supportsChunkedUploads(): bool
 
Interface FileInfoResult. 
 
 
 
 
◆ setUp()
◆ testImplementsFactoryInterface()
      
        
          | FileInputTest::testImplementsFactoryInterface  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 143 of file FileInputTest.php.
References Vendor\Package\$f.
  149         $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $text);
   150         $this->assertInstanceOf(Field\File::class, $text);
 Class ChatMainBarProvider . 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testRender()
      
        
          | FileInputTest::testRender  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 154 of file FileInputTest.php.
References Vendor\Package\$f, and $r.
  159         $text = 
$f->file($this->
getUploadHandler(), $label, $byline)->withNameFrom($this->name_source);
   165             <div class="form-group row">   166                 <label class="control-label col-sm-4 col-md-3 col-lg-2">label</label>   167                 <div class="col-sm-8 col-md-9 col-lg-10">   168                     <div id="id_3" class="ui-input-file">   169                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list"></div>   170                         <div class="ui-input-file-input-dropzone">   171                             <button class="btn btn-link" data-action="#" id="id_2">select_files_from_computer</button>   172                             <span class="ui-input-file-input-error-msg" data-dz-error-msg></span>   175                     <div class="help-block">byline</div>   179         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ testRenderDisabled()
      
        
          | FileInputTest::testRenderDisabled  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 476 of file FileInputTest.php.
References Vendor\Package\$f, and $r.
  480         $text = 
$f->file($this->
getUploadHandler(), $label)->withNameFrom($this->name_source)->withDisabled(
true);
   486             <div class="form-group row"><label class="control-label col-sm-4 col-md-3 col-lg-2">label</label>   487                 <div class="col-sm-8 col-md-9 col-lg-10">   488                     <div id="id_3" class="ui-input-file">   489                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list"></div>   490                         <div class="ui-input-file-input-dropzone">   491                             <button class="btn btn-link" data-action="#" id="id_2">select_files_from_computer</button>   492                             <span class="ui-input-file-input-error-msg" data-dz-error-msg></span></div>   498         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ testRenderError()
      
        
          | FileInputTest::testRenderError  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 183 of file FileInputTest.php.
References Vendor\Package\$f, and $r.
  189         $text = 
$f->file($this->
getUploadHandler(), $label, $byline)->withNameFrom($this->name_source)->withError($error);
   195             <div class="form-group row"><label class="control-label col-sm-4 col-md-3 col-lg-2">label</label>   196                 <div class="col-sm-8 col-md-9 col-lg-10">   197                     <div class="help-block alert alert-danger" aria-describedby="id_3" role="alert">an_error</div>   198                     <div id="id_3" class="ui-input-file">   199                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list"></div>   200                         <div class="ui-input-file-input-dropzone">   201                             <button class="btn btn-link" data-action="#" id="id_2">select_files_from_computer</button>   202                             <span class="ui-input-file-input-error-msg" data-dz-error-msg></span></div>   204                     <div class="help-block">byline</div>   208         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ testRenderNoByline()
      
        
          | FileInputTest::testRenderNoByline  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 212 of file FileInputTest.php.
References Vendor\Package\$f, and $r.
  216         $text = 
$f->file($this->
getUploadHandler(), $label)->withNameFrom($this->name_source);
   222             <div class="form-group row"><label class="control-label col-sm-4 col-md-3 col-lg-2">label</label>   223                 <div class="col-sm-8 col-md-9 col-lg-10">   224                     <div id="id_3" class="ui-input-file">   225                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list"></div>   226                         <div class="ui-input-file-input-dropzone">   227                             <button class="btn btn-link" data-action="#" id="id_2">select_files_from_computer</button>   228                             <span class="ui-input-file-input-error-msg" data-dz-error-msg></span></div>   233         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ testRenderRequired()
      
        
          | FileInputTest::testRenderRequired  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 451 of file FileInputTest.php.
References Vendor\Package\$f, and $r.
  455         $text = 
$f->file($this->
getUploadHandler(), $label)->withNameFrom($this->name_source)->withRequired(
true);
   461             <div class="form-group row"><label class="control-label col-sm-4 col-md-3 col-lg-2">label<span class="asterisk">*</span></label>   462                 <div class="col-sm-8 col-md-9 col-lg-10">   463                     <div id="id_3" class="ui-input-file">   464                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list"></div>   465                         <div class="ui-input-file-input-dropzone">   466                             <button class="btn btn-link" data-action="#" id="id_2">select_files_from_computer</button>   467                             <span class="ui-input-file-input-error-msg" data-dz-error-msg></span></div>   472         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ testRenderValue()
      
        
          | FileInputTest::testRenderValue  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 237 of file FileInputTest.php.
  239         $test_file_id = 
"test_file_id_1";
   240         $test_file_name = 
"test file name 1";
   242         $test_file_info = $this->createMock(FileInfoResult::class);
   243         $test_file_info->method(
'getFileIdentifier')->willReturn(
"test_file_id_1");
   244         $test_file_info->method(
'getName')->willReturn(
"test file name 1");
   245         $test_file_info->method(
'getSize')->willReturn(1001);
   252         ])->withNameFrom($this->name_source);
   257 <div class="form-group row">   258         <label class="control-label col-sm-4 col-md-3 col-lg-2"></label>   259         <div class="col-sm-8 col-md-9 col-lg-10">   260                 <div id="id_4" class="ui-input-file">   261                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list">   262                                 <div class="ui-input-file-input ui-input-dynamic-input">   263                                         <div class="ui-input-file-info">   264                                                 <span data-action="expand"></span>   265                                                 <span data-action="collapse"></span>   266                                                 <span data-dz-name>test file name 1</span>   267                                                 <span data-dz-size>1 KB</span>   268                                                 <span data-action="remove">   269                                                         <a tabindex="0" class="glyph" href="#" aria-label="close">   270                                                                 <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>   273                                                 <span class="ui-input-file-input-error-msg" data-dz-error-msg></span>   275                                         <div class="ui-input-file-metadata" style="display: none;">   276                                                 <input id="id_1" type="hidden" name="name_0[input_0][]" value="test_file_id_1"/>   278                                         <div class="ui-input-file-input-progress-container">   279                                                 <div class="ui-input-file-input-progress-indicator"></div>   283                         <div class="ui-input-file-input-dropzone">   284                                 <button class="btn btn-link" data-action="#" id="id_3">select_files_from_computer</button>   285                                 <span class="ui-input-file-input-error-msg" data-dz-error-msg></span>   291         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ testRenderWithMetadata()
      
        
          | FileInputTest::testRenderWithMetadata  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 295 of file FileInputTest.php.
References $r, and ILIAS\UI\Implementation\Component\Input\ViewControl\withNameFrom().
  299         $metadata_input = $factory->text(
"text_input");
   300         $file_input = $factory->file(
   307                 $u->getFileIdentifierParameterName() => 
"file_id",
   316 <div class="form-group row">   317         <label class="control-label col-sm-4 col-md-3 col-lg-2">file_input</label>   318         <div class="col-sm-8 col-md-9 col-lg-10">   319                 <div id="id_6" class="ui-input-file">   320                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list">   321                                 <div class="ui-input-file-input ui-input-dynamic-input">   322                                         <div class="ui-input-file-info">   323                                                 <span data-action="expand">   324                                                         <a tabindex="0" class="glyph" href="#" aria-label="expand_content">   325                                                                 <span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span>   328                                                 <span data-action="collapse">   329                                                         <a tabindex="0" class="glyph" href="#" aria-label="collapse_content">   330                                                                 <span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span>   333                                                 <span data-dz-name></span>   334                                                 <span data-dz-size></span>   335                                                 <span data-action="remove">   336                                                         <a tabindex="0" class="glyph" href="#" aria-label="close">   337                                                                 <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>   340                                                 <span class="ui-input-file-input-error-msg" data-dz-error-msg></span>   342                                         <div class="ui-input-file-metadata" style="display: none;">   343                                                 <div class="form-group row">   344                                                         <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">text_input</label>   345                                                         <div class="col-sm-8 col-md-9 col-lg-10">   346                                                                 <input id="id_1" type="text" name="name_0[input_1][]" class="form-control form-control-sm"/>   349                                                 <input id="id_2" type="hidden" name="name_0[input_2][]" value="file_id"/>   351                                         <div class="ui-input-file-input-progress-container">   352                                                 <div class="ui-input-file-input-progress-indicator"></div>   356                         <div class="ui-input-file-input-dropzone">   357                                 <button class="btn btn-link" data-action="#" id="id_5">select_files_from_computer</button>   358                                 <span class="ui-input-file-input-error-msg" data-dz-error-msg></span>   365         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ testRenderWithMetadataValue()
      
        
          | FileInputTest::testRenderWithMetadataValue  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 369 of file FileInputTest.php.
References $r, and ILIAS\UI\Implementation\Component\Input\ViewControl\withNameFrom().
  371         $test_file_id = 
"test_file_id_1";
   372         $test_file_name = 
"test file name 1";
   374         $test_file_info = $this->createMock(FileInfoResult::class);
   375         $test_file_info->method(
'getFileIdentifier')->willReturn(
"test_file_id_1");
   376         $test_file_info->method(
'getName')->willReturn(
"test file name 1");
   377         $test_file_info->method(
'getSize')->willReturn(1000 * 1000 + 1);
   381         $metadata_input = $factory->text(
"text_input");
   382         $file_input = $factory->file(
   389                 $u->getFileIdentifierParameterName() => $test_file_id,
   398 <div class="form-group row">   399         <label class="control-label col-sm-4 col-md-3 col-lg-2">file_input</label>   400         <div class="col-sm-8 col-md-9 col-lg-10">   401                 <div id="id_6" class="ui-input-file">   402                         <div class="ui-input-file-input-list ui-input-dynamic-inputs-list">   403                                 <div class="ui-input-file-input ui-input-dynamic-input">   404                                         <div class="ui-input-file-info">   405                                                 <span data-action="expand">   406                                                         <a tabindex="0" class="glyph" href="#" aria-label="expand_content">   407                                                                 <span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span>   410                                                 <span data-action="collapse">   411                                                         <a tabindex="0" class="glyph" href="#" aria-label="collapse_content">   412                                                                 <span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span>   415                                                 <span data-dz-name>test file name 1</span>   416                                                 <span data-dz-size>1 MB</span>   417                                                 <span data-action="remove">   418                                                         <a tabindex="0" class="glyph" href="#" aria-label="close">   419                                                                 <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>   422                                                 <span class="ui-input-file-input-error-msg" data-dz-error-msg></span>   424                                         <div class="ui-input-file-metadata" style="display: none;">   425                                                 <div class="form-group row">   426                                                         <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">text_input</label>   427                                                         <div class="col-sm-8 col-md-9 col-lg-10">   428                                                                 <input id="id_1" type="text" value="test" name="name_0[input_1][]" class="form-control form-control-sm"/>   431                                                 <input id="id_2" type="hidden" name="name_0[input_2][]" value="test_file_id_1"/>   433                                         <div class="ui-input-file-input-progress-container">   434                                                 <div class="ui-input-file-input-progress-indicator"></div>   438                         <div class="ui-input-file-input-dropzone">   439                                 <button class="btn btn-link" data-action="#" id="id_5">select_files_from_computer</button>   440                                 <span class="ui-input-file-input-error-msg" data-dz-error-msg></span>   447         $this->assertEquals($expected, $html);
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 
 
 
◆ $name_source
The documentation for this class was generated from the following file: