ILIAS  release_8 Revision v8.23
ModalTest Class Reference

Tests on abstract base class for modals. More...

+ Inheritance diagram for ModalTest:
+ Collaboration diagram for ModalTest:

Public Member Functions

 test_with_close_with_keyboard ()
 
 test_with_async_rendered_url ()
 
 test_get_signals ()
 
 test_with_reset_signals ()
 
- Public Member Functions inherited from ModalBase
 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

 getModal ()
 
- Protected Member Functions inherited from ModalBase
 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

Tests on abstract base class for modals.

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

Definition at line 30 of file ModalTest.php.

Member Function Documentation

◆ getModal()

ModalTest::getModal ( )
protected

Definition at line 70 of file ModalTest.php.

Referenced by test_get_signals(), test_with_async_rendered_url(), test_with_close_with_keyboard(), and test_with_reset_signals().

70  : ModalMock
71  {
72  return new ModalMock(new IncrementalSignalGenerator());
73  }
+ Here is the caller graph for this function:

◆ test_get_signals()

ModalTest::test_get_signals ( )

Definition at line 46 of file ModalTest.php.

References getModal().

46  : void
47  {
48  $modal = $this->getModal();
49  $show = $modal->getShowSignal();
50  $close = $modal->getCloseSignal();
51  $this->assertEquals('signal_1', "$show");
52  $this->assertEquals('signal_2', "$close");
53  $modal2 = $modal->withAsyncRenderUrl('blub');
54  $show = $modal2->getShowSignal();
55  $close = $modal2->getCloseSignal();
56  $this->assertEquals('signal_1', "$show");
57  $this->assertEquals('signal_2', "$close");
58  }
+ Here is the call graph for this function:

◆ test_with_async_rendered_url()

ModalTest::test_with_async_rendered_url ( )

Definition at line 40 of file ModalTest.php.

References getModal().

40  : void
41  {
42  $modal = $this->getModal()->withAsyncRenderUrl('/fake/async/url');
43  $this->assertEquals('/fake/async/url', $modal->getAsyncRenderUrl());
44  }
+ Here is the call graph for this function:

◆ test_with_close_with_keyboard()

ModalTest::test_with_close_with_keyboard ( )

Definition at line 32 of file ModalTest.php.

References getModal().

32  : void
33  {
34  $modal = $this->getModal();
35  $this->assertEquals(true, $modal->getCloseWithKeyboard());
36  $modal = $modal->withCloseWithKeyboard(false);
37  $this->assertEquals(false, $modal->getCloseWithKeyboard());
38  }
+ Here is the call graph for this function:

◆ test_with_reset_signals()

ModalTest::test_with_reset_signals ( )

Definition at line 60 of file ModalTest.php.

References getModal().

60  : void
61  {
62  $modal = $this->getModal();
63  $modal2 = $modal->withResetSignals();
64  $show = $modal2->getShowSignal();
65  $close = $modal2->getCloseSignal();
66  $this->assertEquals('signal_3', "$show");
67  $this->assertEquals('signal_4', "$close");
68  }
+ Here is the call graph for this function:

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