Unit tests for template class.
More...
Unit tests for template class.
- Author
- Alex Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
- Version
- $Id$ needsInstalledILIAS
Definition at line 15 of file ilTemplateTest.php.
◆ setUp()
ilTemplateTest::setUp |
( |
| ) |
|
|
protected |
Setup.
Definition at line 20 of file ilTemplateTest.php.
22 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
23 require_once
'./Services/PHPUnit/classes/class.ilUnitUtil.php';
24 ilUnitUtil::performInitialisation();
26 chdir(dirname(__FILE__));
31 include_once(
"./Services/Component/classes/class.ilPluginAdmin.php");
32 global $ilPluginAdmin;
33 $ilPluginAdmin = $this->getMockBuilder(
'ilPluginAdmin')
35 $ilPluginAdmin->method(
'getActivePluginsForSlot')
36 ->willReturn(array());
◆ testilTemplateGet()
ilTemplateTest::testilTemplateGet |
( |
| ) |
|
enabled
Definition at line 42 of file ilTemplateTest.php.
References $tpl.
44 include_once(
"./Services/UICore/classes/class.ilTemplate.php");
45 $tpl =
new ilTemplate(
"tpl.test_template_1.html",
true,
true,
"Services/UICore/test");
46 $tpl->setVariable(
"CONTENT",
"Hello World");
48 $actual =
$tpl->get();
51 $expected =
"<b>Hello World</b>";
55 "ilTemplate get() not rendered properly."
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
The documentation for this class was generated from the following file: