ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
DIContainerTest.php
Go to the documentation of this file.
1 <?php
2 
19 namespace ILIAS\DI;
20 
22 
26 class 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 
43  public function testIsDependencyAvailableIfAvailable(): void
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:35
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Container.php:19
Class DIContainerTest.