ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilSystemStyleBaseFS Class Reference
+ Inheritance diagram for ilSystemStyleBaseFS:
+ Collaboration diagram for ilSystemStyleBaseFS:

Protected Member Functions

 setUp ()
 
 getAllContentOfFolder (string $directory)
 
 tearDown ()
 

Protected Attributes

ilSystemStyleConfigMock $system_style_config
 
ilSkinStyleContainer $container
 
ilSkinStyle $style
 
ilFileSystemHelper $file_system
 
ILIAS DI Container $save_dic = null
 
ilLanguage $lng
 
ilSystemStyleMessageStack $message_stack
 

Detailed Description

Definition at line 25 of file ilSystemStyleBaseFS.php.

Member Function Documentation

◆ getAllContentOfFolder()

ilSystemStyleBaseFS::getAllContentOfFolder ( string  $directory)
protected

Definition at line 61 of file ilSystemStyleBaseFS.php.

Referenced by ilSystemStyleStyleScssTest\testGetContent(), ilSystemStyleStyleScssTest\testReadWriteDouble(), and ilSystemStyleStyleScssTest\testReadWriteDoubleRealFolderSCSS().

61  : string
62  {
63  $files = scandir($directory);
64  $content = "";
65 
66  foreach ($files as $file) {
67  if (is_file($directory . '/' . $file)) {
68  $content .= file_get_contents($directory . '/' . $file);
69  }
70  }
71 
72  return $content;
73  }
+ Here is the caller graph for this function:

◆ setUp()

ilSystemStyleBaseFS::setUp ( )
protected

Definition at line 35 of file ilSystemStyleBaseFS.php.

References $DIC, and ILIAS\Repository\lng().

35  : void
36  {
37  global $DIC;
38  $DIC['tpl'] = $this->getMockBuilder(ilGlobalTemplateInterface::class)->getMock();
39  $this->system_style_config = new ilSystemStyleConfigMock();
40  $this->message_stack = new ilSystemStyleMessageStack($DIC['tpl']);
41 
42  if (!file_exists($this->system_style_config->test_skin_temp_path)) {
43  mkdir($this->system_style_config->test_skin_temp_path);
44  }
45 
47  include_once('./tests/UI/Base.php');
48  $this->lng = new ilLanguageMock();
49 
50  $this->file_system = new ilFileSystemHelper($this->lng, $this->message_stack);
51  $this->file_system->recursiveCopy(
52  $this->system_style_config->test_skin_original_path,
53  $this->system_style_config->test_skin_temp_path
54  );
55 
56  $factory = new ilSkinFactory($this->lng, $this->system_style_config);
57  $this->container = $factory->skinStyleContainerFromId('skin1', $this->message_stack);
58  $this->style = $this->container->getSkin()->getStyle('style1');
59  }
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
File System Helper, to reduce deps.
global $DIC
Definition: feed.php:28
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
Used to stack messages to be shown to the user.
+ Here is the call graph for this function:

◆ tearDown()

ilSystemStyleBaseFS::tearDown ( )
protected

Definition at line 75 of file ilSystemStyleBaseFS.php.

75  : void
76  {
77  $this->file_system->recursiveRemoveDir($this->system_style_config->test_skin_temp_path);
78  }

Field Documentation

◆ $container

◆ $file_system

ilFileSystemHelper ilSystemStyleBaseFS::$file_system
protected

Definition at line 30 of file ilSystemStyleBaseFS.php.

◆ $lng

ilLanguage ilSystemStyleBaseFS::$lng
protected

◆ $message_stack

◆ $save_dic

ILIAS DI Container ilSystemStyleBaseFS::$save_dic = null
protected

Definition at line 31 of file ilSystemStyleBaseFS.php.

◆ $style

ilSkinStyle ilSystemStyleBaseFS::$style
protected

Definition at line 29 of file ilSystemStyleBaseFS.php.

◆ $system_style_config

ilSystemStyleConfigMock ilSystemStyleBaseFS::$system_style_config
protected

Definition at line 27 of file ilSystemStyleBaseFS.php.


The documentation for this class was generated from the following file: