ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilServicesFileSystemTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /******************************************************************************
6  *
7  * This file is part of ILIAS, a powerful learning management system.
8  *
9  * ILIAS is licensed with the GPL-3.0, you should have received a copy
10  * of said license along with the source code.
11  *
12  * If this is not the case or you just want to try ILIAS, you'll find
13  * us at:
14  * https://www.ilias.de
15  * https://github.com/ILIAS-eLearning
16  *
17  *****************************************************************************/
18 
20 
21 class ilServicesFileSystemTest extends TestCase
22 {
24 
25  public function testTrailingSlashes(): void
26  {
27  $file_data = new ilFileData();
28  $this->assertEquals('/var/www/ilias', $file_data->deleteTrailingSlash('/var/www/ilias/'));
29  $this->assertEquals('\\var\\www\\ilias', $file_data->deleteTrailingSlash('\\var\\www\\ilias\\'));
30  }
31 
32  public function testBaseDirectory(): void
33  {
34  if (!defined('CLIENT_DATA_DIR')) {
35  define('CLIENT_DATA_DIR', '/var/iliasdata');
36  }
37  $file_data = new ilFileData();
38  $this->assertEquals(CLIENT_DATA_DIR, $file_data->getPath());
39  }
40 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
const CLIENT_DATA_DIR
Definition: constants.php:46