ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 
10 
15 
19  public function getFactory() {
20  return new \ILIAS\UI\Implementation\Factory();
21  }
22 
24  $f = $this->getFactory();
25 
26  $this->assertInstanceOf("ILIAS\\UI\\Factory", $f);
27  $this->assertInstanceOf
28  ( "ILIAS\\UI\\Component\\Legacy\\Legacy"
29  , $f->legacy("Legacy Content")
30  );
31  }
32 
33  public function test_get_content() {
34  $f = $this->getFactory();
35  $g = $f->legacy("Legacy Content");
36 
37  $this->assertEquals($g->getContent(), "Legacy Content");
38  }
39 
40 
41  public function test_render_content() {
42  $f = $this->getFactory();
43  $r = $this->getDefaultRenderer();
44 
45  $g = $f->legacy("Legacy Content");
46 
47  $this->assertEquals($r->render($g), "Legacy Content");
48  }
49 }
test_get_content()
Definition: LegacyTest.php:33
test_render_content()
Definition: LegacyTest.php:41
test_implements_factory_interface()
Definition: LegacyTest.php:23
$r
Definition: example_031.php:79
Provides common functionality for UI tests.
Definition: Base.php:69
getDefaultRenderer()
Definition: Base.php:100
Test on button implementation.
Definition: LegacyTest.php:14