ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
DIContainerTest.php
Go to the documentation of this file.
1
<?
php
2
namespace
ILIAS\DI
;
3
4
require_once(
'./libs/composer/vendor/autoload.php'
);
5
9
class
DIContainerTest
extends
\PHPUnit_Framework_TestCase
10
{
11
15
protected
$DIC
;
16
17
protected
function
setUp
()
18
{
19
$this->
DIC
=
new
Container
();
20
}
21
22
public
function
testIsDependencyAvailableIfNotAvailable
()
23
{
24
$this->assertFalse($this->
DIC
->isDependencyAvailable(
"ctrl"
));
25
}
26
27
public
function
testIsDependencyAvailableIfAvailable
()
28
{
29
$this->
DIC
[
"ilCtrl"
] =
function
() {
30
};
31
$this->assertTrue($this->
DIC
->isDependencyAvailable(
"ctrl"
));
32
}
33
}
PHPUnit_Framework_TestCase
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:16
ILIAS\DI
Class HTTPServicesTest.
Definition:
BackgroundTaskServices.php:3
ILIAS\DI\DIContainerTest\testIsDependencyAvailableIfNotAvailable
testIsDependencyAvailableIfNotAvailable()
Definition:
DIContainerTest.php:22
ILIAS\DI\DIContainerTest\$DIC
$DIC
Definition:
DIContainerTest.php:15
ILIAS\DI\DIContainerTest\setUp
setUp()
Definition:
DIContainerTest.php:17
ILIAS\DI\DIContainerTest\testIsDependencyAvailableIfAvailable
testIsDependencyAvailableIfAvailable()
Definition:
DIContainerTest.php:27
DIC
php
ILIAS\DI\DIContainerTest
Class DIContainerTest.
Definition:
DIContainerTest.php:9
tests
DI
DIContainerTest.php
Generated on Thu Feb 27 2025 19:02:12 for ILIAS by
1.8.13 (using
Doxyfile
)