ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ($html)
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getRefinery ()
 
 getImagePathResolver ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML ($html)
 
 assertHTMLEquals ($expected_html_as_string, $html_as_string)
 

Protected Member Functions

 getModalFactory ()
 
 getButtonFactory ()
 
 getDummyComponent ()
 
- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML ($html)
 A more radical version of normalizeHTML. 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 13 of file ModalBase.php.

Member Function Documentation

◆ getButtonFactory()

ModalBase::getButtonFactory ( )
protected

Definition at line 36 of file ModalBase.php.

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

37  {
38  return new \ILIAS\UI\Implementation\Component\Button\Factory();
39  }
+ Here is the caller graph for this function:

◆ getDummyComponent()

ModalBase::getDummyComponent ( )
protected

◆ getModalFactory()

◆ getUIFactory()

ModalBase::getUIFactory ( )

Definition at line 15 of file ModalBase.php.

References Vendor\Package\$f, $factory, and legacy().

Referenced by RoundTripTest\test_simple_rendering().

16  {
17  $factory = new class extends NoUIFactory {
18  public function counter()
19  {
20  return new I\Component\Counter\Factory();
21  }
22  public function legacy($content)
23  {
24  $f = new I\Component\Legacy\Factory(new I\Component\SignalGenerator());
25  return $f->legacy($content);
26  }
27  };
28  return $factory;
29  }
legacy()
Definition: legacy.php:3
$factory
Definition: metadata.php:58
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalizeHTML()

ModalBase::normalizeHTML (   $html)

Definition at line 46 of file ModalBase.php.

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

47  {
48  $html = parent::normalizeHTML($html);
49  // The times entity is used for closing the modal and not supported in DomDocument::loadXML()
50  return str_replace(['×', "\t"], ['', ''], $html);
51  }
+ Here is the caller graph for this function:

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