ILIAS  release_8 Revision v8.24
ilCtrlPathTestBase.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5/* Copyright (c) 2021 Thibeau Fuhrer <thf@studer-raimann.ch> Extended GPL, see docs/LICENSE */
6
7use PHPUnit\Framework\TestCase;
8
13class ilCtrlPathTestBase extends TestCase
14{
19
23 protected function setUp(): void
24 {
25 $structure_artifact = require __DIR__ . '/../Data/Structure/test_ctrl_structure.php';
26 $base_class_artifact = require __DIR__ . '/../Data/Structure/test_base_classes.php';
27
28 $this->structure = new ilCtrlStructure(
29 $structure_artifact,
30 $base_class_artifact,
31 []
32 );
33 }
34
39 protected function getPath(string $cid_path = null): ilCtrlPathInterface
40 {
41 return new class ($this->structure, $cid_path) extends ilCtrlAbstractPath {
42 public function __construct(ilCtrlStructureInterface $structure, string $cid_path = null)
43 {
45 $this->cid_path = $cid_path;
46 }
47 };
48 }
49}
Class ilCtrlAbstractPath.
Class ilCtrlPathTestBase.
ilCtrlStructureInterface $structure
getPath(string $cid_path=null)
Class ilCtrlStructure holds the currently read control structure.
Interface ilCtrlPathInterface is responsible for holding and manipulating a valid ilCtrl class-path (...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc