ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ModalBase Class Reference

Base class for modal tests. More...

+ Inheritance diagram for ModalBase:
+ Collaboration diagram for ModalBase:

Public Member Functions

 getUIFactory ()
 
 normalizeHTML (string $html)
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getRefinery ()
 
 getImagePathResolver ()
 
 getDataFactory ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML (string $html)
 
 assertHTMLEquals (string $expected_html_as_string, string $html_as_string)
 

Protected Member Functions

 getModalFactory ()
 
 getButtonFactory ()
 
 getDummyComponent ()
 
- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML (string $html)
 A more radical version of normalizeHTML. More...
 
 brutallyTrimSignals (string $html)
 A naive replacement of all il_signal-ids with dots to ease comparisons of rendered output. More...
 

Detailed Description

Base class for modal tests.

Author
Stefan Wanzenried sw@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 34 of file ModalBase.php.

Member Function Documentation

◆ getButtonFactory()

ModalBase::getButtonFactory ( )
protected

Definition at line 62 of file ModalBase.php.

Referenced by RoundTripTest\test_get_action_buttons(), RoundTripTest\test_simple_rendering(), and RoundTripTest\test_with_action_buttons().

62  : I\Component\Button\Factory
63  {
64  return new I\Component\Button\Factory();
65  }
+ Here is the caller graph for this function:

◆ getDummyComponent()

ModalBase::getDummyComponent ( )
protected

◆ getModalFactory()

ModalBase::getModalFactory ( )
protected

◆ getUIFactory()

ModalBase::getUIFactory ( )

Definition at line 36 of file ModalBase.php.

References Vendor\Package\$f, and ILIAS\UI\examples\MainControls\Slate\Legacy\legacy().

Referenced by RoundTripTest\test_simple_rendering().

36  : NoUIFactory
37  {
38  return new class () extends NoUIFactory {
39  public function counter(): C\Counter\Factory
40  {
41  return new I\Component\Counter\Factory();
42  }
43  public function legacy(string $content): C\Legacy\Legacy
44  {
45  $f = new I\Component\Legacy\Factory(new I\Component\SignalGenerator());
46  return $f->legacy($content);
47  }
48  };
49  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalizeHTML()

ModalBase::normalizeHTML ( string  $html)

Definition at line 72 of file ModalBase.php.

Referenced by LightboxTest\test_different_page_type_rendering(), LightboxTest\test_simple_image_page_rendering(), and LightboxTest\test_simple_text_page_rendering().

72  : string
73  {
74  $html = parent::normalizeHTML($html);
75  // The times entity is used for closing the modal and not supported in DomDocument::loadXML()
76  return str_replace(['×', "\t"], ['', ''], $html);
77  }
+ Here is the caller graph for this function:

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