ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
LegacyTest.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
4 
5 require_once(__DIR__ . "/../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__ . "/../../Base.php");
7 
8 use \ILIAS\UI\Component as C;
9 
14 {
15 
19  public function getFactory()
20  {
21  return new \ILIAS\UI\Implementation\Factory();
22  }
23 
25  {
26  $f = $this->getFactory();
27 
28  $this->assertInstanceOf("ILIAS\\UI\\Factory", $f);
29  $this->assertInstanceOf(
30  "ILIAS\\UI\\Component\\Legacy\\Legacy",
31  $f->legacy("Legacy Content")
32  );
33  }
34 
35  public function test_get_content()
36  {
37  $f = $this->getFactory();
38  $g = $f->legacy("Legacy Content");
39 
40  $this->assertEquals($g->getContent(), "Legacy Content");
41  }
42 
43 
44  public function test_render_content()
45  {
46  $f = $this->getFactory();
47  $r = $this->getDefaultRenderer();
48 
49  $g = $f->legacy("Legacy Content");
50 
51  $this->assertEquals($r->render($g), "Legacy Content");
52  }
53 }
test_get_content()
Definition: LegacyTest.php:35
test_render_content()
Definition: LegacyTest.php:44
test_implements_factory_interface()
Definition: LegacyTest.php:24
getDefaultRenderer(JavaScriptBinding $js_binding=null)
Definition: Base.php:216
$r
Definition: example_031.php:79
Provides common functionality for UI tests.
Definition: Base.php:177
Test on button implementation.
Definition: LegacyTest.php:13