ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ModalBase Class Reference

Base class for modal tests. More...

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

Public Member Functions

 getUIFactory ()
 
 normalizeHTML (string $html)
 

Protected Member Functions

 getModalFactory ()
 
 getButtonFactory ()
 
 getDummyComponent ()
 

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 66 of file ModalBase.php.

Referenced by RoundTripTest\testGetActionButtons(), RoundTripTest\testSimpleRendering(), and RoundTripTest\testWithActionButtons().

66  : I\Component\Button\Factory
67  {
68  return new I\Component\Button\Factory();
69  }
+ Here is the caller graph for this function:

◆ getDummyComponent()

ModalBase::getDummyComponent ( )
protected

◆ getModalFactory()

ModalBase::getModalFactory ( )
protected

Definition at line 51 of file ModalBase.php.

Referenced by LightboxTest\testDifferentPageTypeRendering(), RoundTripTest\testGetActionButtons(), InterruptiveTest\testGetAffectedItems(), RoundTripTest\testGetContent(), InterruptiveTest\testGetFormAction(), InterruptiveTest\testGetMessage(), LightboxTest\testGetMultiplePage(), LightboxTest\testGetSinglePage(), RoundTripTest\testGetTitle(), InterruptiveTest\testGetTitle(), ModalFactoryTest\testImplementsFactoryInterface(), InterruptiveTest\testRenderingWithItems(), LightboxTest\testSimplePageRendering(), RoundTripTest\testSimpleRendering(), InterruptiveTest\testSimpleRendering(), RoundTripTest\testWithActionButtons(), InterruptiveTest\testWithAffectedItems(), and InterruptiveTest\testWithFormAction().

51  : I\Component\Modal\Factory
52  {
53  $group_mock = $this->createMock(Group::class);
54  $group_mock->method('withNameFrom')->willReturnSelf();
55 
56  $factory_mock = $this->createMock(FieldFactory::class);
57  $factory_mock->method('group')->willReturn($group_mock);
58 
59  return new I\Component\Modal\Factory(
60  new SignalGeneratorMock(),
61  $this->createMock(C\Modal\InterruptiveItem\Factory::class),
62  $factory_mock
63  );
64  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ 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\testSimpleRendering().

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...
legacy()
expected output: > ILIAS shows the rendered Component.
Definition: legacy.php:13
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalizeHTML()

ModalBase::normalizeHTML ( string  $html)

Definition at line 76 of file ModalBase.php.

Referenced by LightboxTest\testDifferentPageTypeRendering(), InterruptiveTest\testRenderingWithItems(), and LightboxTest\testSimplePageRendering().

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

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