ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
DefaultRendererTest Class Reference
+ Inheritance diagram for DefaultRendererTest:
+ Collaboration diagram for DefaultRendererTest:

Public Member Functions

 test_instantiateRenderer_successfully ()
 
 test_getRenderer_successfully ()
 
 test_getRenderer_caching ()
 
 test_getRendererNameFor ()
 
 getResourceRegistry ()
 
 test_invokesRegistry ()
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getDefaultRenderer ()
 
 normalizeHTML ($html)
 
 assertHTMLEquals ($expected_html_as_string, $html_as_string)
 

Detailed Description

Definition at line 39 of file DefaultRendererTest.php.

Member Function Documentation

◆ getResourceRegistry()

DefaultRendererTest::getResourceRegistry ( )

Definition at line 69 of file DefaultRendererTest.php.

69  {
70  $this->resource_registry = parent::getResourceRegistry();
71  return $this->resource_registry;
72  }

◆ test_getRenderer_caching()

DefaultRendererTest::test_getRenderer_caching ( )

Definition at line 54 of file DefaultRendererTest.php.

54  {
55  $dr = $this->getDefaultRenderer();
56  $r1 = $dr->getRendererFor("\\ILIAS\\UI\\Implementation\\Component\\Glyph\\Glyph");
57  $r2 = $dr->getRendererFor("\\ILIAS\\UI\\Implementation\\Component\\Glyph\\Glyph");
58  $this->assertTrue($r1 === $r2, "Instances not equal");
59  }
getDefaultRenderer()
Definition: Base.php:100

◆ test_getRenderer_successfully()

DefaultRendererTest::test_getRenderer_successfully ( )

Definition at line 47 of file DefaultRendererTest.php.

References $r.

47  {
48  // There should be a renderer for Glyph...
49  $dr = $this->getDefaultRenderer();
50  $r = $dr->getRendererFor("\\ILIAS\\UI\\Implementation\\Component\\Glyph\\Glyph");
51  $this->assertInstanceOf("\\ILIAS\\UI\\Implementation\\Render\\ComponentRenderer", $r);
52  }
$r
Definition: example_031.php:79
getDefaultRenderer()
Definition: Base.php:100

◆ test_getRendererNameFor()

DefaultRendererTest::test_getRendererNameFor ( )

Definition at line 61 of file DefaultRendererTest.php.

61  {
62  $dr = $this->getDefaultRenderer();
63 
64  $renderer_class = $dr->getRendererNameFor("\\ILIAS\\UI\\Implementation\\Component\\Glyph\\Glyph");
65  $expected = "\\ILIAS\\UI\\Implementation\\Component\\Glyph\\Renderer";
66  $this->assertEquals($expected, $renderer_class);
67  }
getDefaultRenderer()
Definition: Base.php:100

◆ test_instantiateRenderer_successfully()

DefaultRendererTest::test_instantiateRenderer_successfully ( )

Definition at line 40 of file DefaultRendererTest.php.

References $r.

40  {
41  // There should be a renderer for Glyph...
42  $dr = $this->getDefaultRenderer();
43  $r = $dr->instantiateRendererFor("\\ILIAS\\UI\\Implementation\\Component\\Glyph\\Glyph");
44  $this->assertInstanceOf("\\ILIAS\\UI\\Implementation\\Render\\ComponentRenderer", $r);
45  }
$r
Definition: example_031.php:79
getDefaultRenderer()
Definition: Base.php:100

◆ test_invokesRegistry()

DefaultRendererTest::test_invokesRegistry ( )

Definition at line 74 of file DefaultRendererTest.php.

References array.

74  {
75  $dr = $this->getDefaultRenderer();
76  $component = new \ILIAS\UI\Test\TestComponent("foo");
77 
78  $dr->render($component);
79 
80  $this->assertEquals(array("test.js"), $this->resource_registry->resources);
81  }
Create styles array
The data for the language used.
getDefaultRenderer()
Definition: Base.php:100

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