ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ($html)
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null)
 
 normalizeHTML ($html)
 
 assertHTMLEquals ($expected_html_as_string, $html_as_string)
 

Protected Member Functions

 getModal ()
 
- Protected Member Functions inherited from ModalBase
 getModalFactory ()
 
 getButtonFactory ()
 
 getDummyComponent ()
 

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 12 of file ModalTest.php.

Member Function Documentation

◆ getModal()

ModalTest::getModal ( )
protected

Definition at line 52 of file ModalTest.php.

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

53  {
54  return new ModalMock(new IncrementalSignalGenerator());
55  }
+ Here is the caller graph for this function:

◆ test_get_signals()

ModalTest::test_get_signals ( )

Definition at line 28 of file ModalTest.php.

References getModal().

29  {
30  $modal = $this->getModal();
31  $show = $modal->getShowSignal();
32  $close = $modal->getCloseSignal();
33  $this->assertEquals('signal_1', "$show");
34  $this->assertEquals('signal_2', "$close");
35  $modal2 = $modal->withAsyncRenderUrl('blub');
36  $show = $modal2->getShowSignal();
37  $close = $modal2->getCloseSignal();
38  $this->assertEquals('signal_1', "$show");
39  $this->assertEquals('signal_2', "$close");
40  }
+ Here is the call graph for this function:

◆ test_with_async_rendered_url()

ModalTest::test_with_async_rendered_url ( )

Definition at line 22 of file ModalTest.php.

References getModal().

23  {
24  $modal = $this->getModal()->withAsyncRenderUrl('/fake/async/url');
25  $this->assertEquals('/fake/async/url', $modal->getAsyncRenderUrl());
26  }
+ Here is the call graph for this function:

◆ test_with_close_with_keyboard()

ModalTest::test_with_close_with_keyboard ( )

Definition at line 14 of file ModalTest.php.

References getModal().

15  {
16  $modal = $this->getModal();
17  $this->assertEquals(true, $modal->getCloseWithKeyboard());
18  $modal = $modal->withCloseWithKeyboard(false);
19  $this->assertEquals(false, $modal->getCloseWithKeyboard());
20  }
+ Here is the call graph for this function:

◆ test_with_reset_signals()

ModalTest::test_with_reset_signals ( )

Definition at line 42 of file ModalTest.php.

References getModal().

43  {
44  $modal = $this->getModal();
45  $modal2 = $modal->withResetSignals();
46  $show = $modal2->getShowSignal();
47  $close = $modal2->getCloseSignal();
48  $this->assertEquals('signal_3', "$show");
49  $this->assertEquals('signal_4', "$close");
50  }
+ Here is the call graph for this function:

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