| 
|   | setUp () | 
|   | 
|   | testGetTemplatePath (string $skin, string $style, bool $file_exists, string $tpl_filename, string $component, string $expected) | 
|   | templatePathDataProvider  More...
  | 
|   | 
Definition at line 23 of file ilTemplateTest.php.
 
◆ setUp()
      
        
          | ilTemplateTest::setUp  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 28 of file ilTemplateTest.php.
References $path, and ILIAS\GlobalScreen\Provider\__construct().
   30         $this->il_template = 
new class () extends 
ilTemplate {
    31             protected string $style = 
'delos';
    32             protected string $skin = 
'default';
    33             protected bool $file_exists = 
true;
    37             public function _getTemplatePath(
string $a_tplname, 
string $a_in_module = null): string
    39                 return $this->getTemplatePath($a_tplname, $a_in_module);
    41             protected function getCurrentStyle(): ?string
    45             public function withStyle(
string $style)
    48                 $clone->style = $style;
    51             public function withSkin(
string $skin)
    57             protected function getCurrentSkin(): ?string
    61             protected function fileExistsInSkin(
string $path): bool
    63                 return $this->file_exists;
    65             public function withFileExists(
bool $file_exists)
    68                 $clone->file_exists = $file_exists;
    72         $this->il_root = realpath(__DIR__ . 
'/../../../../');
 
__construct(Container $dic, ilPlugin $plugin)
 
 
 
 
◆ templatePathDataProvider()
  
  
      
        
          | static ilTemplateTest::templatePathDataProvider  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 77 of file ilTemplateTest.php.
   79         $il_root = realpath(__DIR__ . 
'/../../../../');
    81             'standard component template' => [
    82                 'skin' => 
'default', 
'style' => 
'delos', 
'file_exists' => 
true,
    83                 'tpl_filename' => 
'tpl.appointment_panel.html',
    84                 'component' => 
'components/ILIAS/Calendar',
    85                 'expected' => 
$il_root . 
'/components/ILIAS/Calendar/templates/default/tpl.appointment_panel.html'    87             'plugin template' => [
    88                 'skin' => 
'default', 
'style' => 
'delos', 
'file_exists' => 
true,
    89                 'tpl_filename' => 
'tpl.test.html',
    91                 'component' => 
$il_root . 
'/components/ILIAS/Component/classes/../../../../public/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/EditorAsMode',
    92                 'expected' => 
$il_root . 
'/components/ILIAS/Component/classes/../../../../public/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/EditorAsMode/templates/default/tpl.test.html',
    94             'plugin template_file_no_component' => [
    95                 'skin' => 
'default', 
'style' => 
'delos', 
'file_exists' => 
true,
    96                 'tpl_filename' => 
$il_root . 
'/components/ILIAS/Component/classes/../../../../public/Customizing/global/plugins/Services/User/UDFDefinition/CascadingSelect/templates/tpl.prop_cascading_select.html',
    98                 'expected' => 
$il_root . 
'/components/ILIAS/Component/classes/../../../../public/Customizing/global/plugins/Services/User/UDFDefinition/CascadingSelect/templates/tpl.prop_cascading_select.html',
   101                 'skin' => 
'mySkin', 
'style' => 
'myStyle', 
'file_exists' => 
true,
   102                 'tpl_filename' => 
'tpl.external_settings.html',
   103                 'component' => 
'components/ILIAS/Administration',
   104                 'expected' => 
$il_root . 
'/public/Customizing/skin/mySkin/myStyle/components/ILIAS/Administration/tpl.external_settings.html',
   106             'custom skin, unaltered file' => [
   107                 'skin' => 
'mySkin', 
'style' => 
'myStyle', 
'file_exists' => 
false,
   108                 'tpl_filename' => 
'tpl.external_settings.html',
   109                 'component' => 
'components/ILIAS/Administration',
   110                 'expected' => 
$il_root . 
'/components/ILIAS/Administration/templates/default/tpl.external_settings.html',
   113                 'skin' => 
'default', 
'style' => 
'delos', 
'file_exists' => 
true,
   114                 'tpl_filename' => 
'components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
   116                 'expected' => 
$il_root . 
'/components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
   118             'ui template from skin' => [
   119                 'skin' => 
'mySkin', 
'style' => 
'myStyle', 
'file_exists' => 
true,
   120                 'tpl_filename' => 
'components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
   122                 'expected' => 
$il_root . 
'/public/Customizing/skin/mySkin/myStyle/UI/Input/tpl.standard.html',
   124             'ui template from skin, unaltered' => [
   125                 'skin' => 
'mySkin', 
'style' => 
'myStyle', 
'file_exists' => 
false,
   126                 'tpl_filename' => 
'components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
   128                 'expected' => 
$il_root . 
'/components/ILIAS/UI/src/templates/default/Input/tpl.standard.html',
   130             'trailing slash' => [
   131                 'skin' => 
'default', 
'style' => 
'delos', 
'file_exists' => 
true,
   132                 'tpl_filename' => 
'tpl.test.html',
   133                 'component' => 
'components/ILIAS/Test/',
   134                 'expected' => 
$il_root . 
'/components/ILIAS/Test/templates/default/tpl.test.html',
 
 
 
 
◆ testGetTemplatePath()
      
        
          | ilTemplateTest::testGetTemplatePath  | 
          ( | 
          string  | 
          $skin,  | 
        
        
           | 
           | 
          string  | 
          $style,  | 
        
        
           | 
           | 
          bool  | 
          $file_exists,  | 
        
        
           | 
           | 
          string  | 
          $tpl_filename,  | 
        
        
           | 
           | 
          string  | 
          $component,  | 
        
        
           | 
           | 
          string  | 
          $expected  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
templatePathDataProvider 
Definition at line 143 of file ilTemplateTest.php.
References $path.
  151         $path = $this->il_template
   154             ->withFileExists($file_exists)
   155             ->_getTemplatePath($tpl_filename, $component);
   157         $this->assertEquals($expected, 
$path);
 
 
 
 
◆ $il_root
  
  
      
        
          | string ilTemplateTest::$il_root | 
         
       
   | 
  
protected   | 
  
 
 
◆ $il_template
The documentation for this class was generated from the following file: