ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSystemStyleBaseFS.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 require_once('vendor/composer/vendor/autoload.php');
22 
26 
27 abstract class ilSystemStyleBaseFS extends TestCase
28 {
31  protected ilSkinStyle $style;
33  protected Language $lng;
35 
36  protected function setUp(): void
37  {
38  global $DIC;
39  $DIC['tpl'] = $this->getMockBuilder(ilGlobalTemplateInterface::class)->getMock();
40  $this->system_style_config = new ilSystemStyleConfigMock();
41  $this->message_stack = new ilSystemStyleMessageStack($DIC['tpl']);
42 
44  $this->lng = new ilLanguageMock();
45 
46 
47 
48  $factory = new ilSkinFactory($this->lng, $this->system_style_config);
49  $this->container = $factory->skinStyleContainerFromId('skin1', $this->message_stack);
50  $this->style = $this->container->getSkin()->getStyle('style1');
51  }
52 
53  protected function getAllContentOfFolder(string $directory): string
54  {
55  $files = scandir($directory);
56  $content = "";
57 
58  foreach ($files as $file) {
59  if (is_file($directory . '/' . $file)) {
60  $content .= file_get_contents($directory . '/' . $file);
61  }
62  }
63 
64  return $content;
65  }
66 }
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
This class is responsible for all file system related actions related actions of a skin such as copyi...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSystemStyleConfigMock $system_style_config
getAllContentOfFolder(string $directory)
ilSystemStyleMessageStack $message_stack
global $DIC
Definition: shib_login.php:22
ilSystemStyleConfig wraps all &#39;constants&#39; to ensure the testability of all classes using those &#39;const...
ilSkinStyleContainer $container
Used to stack messages to be shown to the user.
ILIAS DI Container $save_dic