ILIAS  release_7 Revision v7.30-3-g800a261c036
DecoratedRendererTest.php
Go to the documentation of this file.
1<?php
2
3/******************************************************************************
4 *
5 * This file is part of ILIAS, a powerful learning management system
6 * published by ILIAS open source e-Learning e.V.
7 *
8 * ILIAS is licensed with the GPL-3.0,
9 * see https://www.gnu.org/licenses/gpl-3.0.en.html
10 * You should have received a copy of said license along with the
11 * source code, too.
12 *
13 * If this is not the case or you just want to try ILIAS, you'll find
14 * us at:
15 * https://www.ilias.de
16 * https://github.com/ILIAS-eLearning
17 *
18 *****************************************************************************/
19
20require_once(__DIR__ . "/TestComponent.php");
21require_once(__DIR__ . "/../Base.php");
22
25
27{
28 public function test_render()
29 {
30 $c1 = new TestComponent("foo");
31 $renderer = $this->getDecoratedRenderer($this->getDefaultRenderer());
32 $html = $renderer->render($c1);
33 $this->assertEquals("foo", $html);
34 }
35
36 public function test_render_async()
37 {
38 $c1 = new TestComponent("foo");
39 $renderer = $this->getDecoratedRenderer($this->getDefaultRenderer());
40 $html = $renderer->renderAsync($c1);
41 $this->assertEquals("foo", $html);
42 }
43
45 {
46 $c1 = new TestComponent("foo");
47 $renderer = $this->getDecoratedRenderer($this->getDefaultRenderer());
48 $renderer->manipulate();
49 $html = $renderer->render($c1);
50 $this->assertEquals("This content was manipulated", $html);
51 }
52}
An exception for terminatinating execution or to throw for unit testing.
Provides common functionality for UI tests.
Definition: Base.php:263
getDecoratedRenderer(Renderer $default)
Definition: Base.php:358
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
Definition: Base.php:311