ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DIContainerTest.php
Go to the documentation of this file.
1<?php
2
19namespace ILIAS\DI;
20
21use PHPUnit\Framework\TestCase;
22
26class DIContainerTest extends TestCase
27{
31 protected $DIC;
32
33 protected function setUp(): void
34 {
35 $this->DIC = new Container();
36 }
37
39 {
40 $this->assertFalse($this->DIC->isDependencyAvailable("ctrl"));
41 }
42
44 {
45 $this->DIC["ilCtrl"] = $this->getMockBuilder(\ilCtrl::class)
46 ->disableOriginalConstructor()
47 ->getMock();
48
49 $this->assertTrue($this->DIC->isDependencyAvailable("ctrl"));
50 }
51}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Class DIContainerTest.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Container.php:19