ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCtrlPathTestBase.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
27class ilCtrlPathTestBase extends TestCase
28{
33
37 protected function setUp(): void
38 {
39 $structure_artifact = require __DIR__ . '/../Data/Structure/test_ctrl_structure.php';
40 $base_class_artifact = require __DIR__ . '/../Data/Structure/test_base_classes.php';
41
42 $this->structure = new ilCtrlStructure(
43 $structure_artifact,
44 $base_class_artifact,
45 []
46 );
47 }
48
53 protected function getPath(?string $cid_path = null): ilCtrlPathInterface
54 {
55 return new class ($this->structure, $cid_path) extends ilCtrlAbstractPath {
56 public function __construct(ilCtrlStructureInterface $structure, ?string $cid_path = null)
57 {
59 $this->cid_path = $cid_path;
60 }
61 };
62 }
63}
Class ilCtrlAbstractPath.
Class ilCtrlPathTestBase.
ilCtrlStructureInterface $structure
getPath(?string $cid_path=null)
Class ilCtrlStructure holds the currently read control structure.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc