ILIAS  release_7 Revision v7.30-3-g800a261c036
DIContainerTest.php
Go to the documentation of this file.
1<?php
2namespace ILIAS\DI;
3
4use PHPUnit\Framework\TestCase;
5
6require_once('./libs/composer/vendor/autoload.php');
7
11class DIContainerTest extends TestCase
12{
13
17 protected $DIC;
18
19 protected function setUp() : void
20 {
21 $this->DIC = new Container();
22 }
23
25 {
26 $this->assertFalse($this->DIC->isDependencyAvailable("ctrl"));
27 }
28
30 {
31 $this->DIC["ilCtrl"] = function () {
32 };
33 $this->assertTrue($this->DIC->isDependencyAvailable("ctrl"));
34 }
35}
An exception for terminatinating execution or to throw for unit testing.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:19
Class DIContainerTest.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...