20        if (
defined(
'ILIAS_PHPUNIT_CONTEXT')) {
 
   21            require_once 
'./Services/PHPUnit/classes/class.ilUnitUtil.php';
 
   22            ilUnitUtil::performInitialisation();
 
   24            chdir(dirname(__FILE__));
 
   29        include_once(
"./Services/Component/classes/class.ilPluginAdmin.php");
 
   30        global $ilPluginAdmin;
 
   31        $ilPluginAdmin = $this->getMockBuilder(
'ilPluginAdmin')
 
   33        $ilPluginAdmin->method(
'getActivePluginsForSlot')
 
   34            ->willReturn(array());
 
   42        include_once(
"./Services/UICore/classes/class.ilTemplate.php");
 
   43        $tpl = 
new ilTemplate(
"tpl.test_template_1.html", 
true, 
true, 
"Services/UICore/test");
 
   44        $tpl->setVariable(
"CONTENT", 
"Hello World");
 
   46        $actual = 
$tpl->get();
 
   49        $expected = 
"<b>Hello World</b>";
 
   53            "ilTemplate get() not rendered properly." 
An exception for terminatinating execution or to throw for unit testing.
Unit tests for template class.
testilTemplateGet()
@backupGlobals enabled
special template class to simplify handling of ITX/PEAR
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'