ILIAS
release_8 Revision v8.24
◀ ilDoc Overview
ilSetupAgentTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
namespace
ILIAS\Tests\Setup
;
21
22
use PHPUnit\Framework\TestCase;
23
use
ILIAS\Setup\NullConfig
;
24
use
ILIAS\Setup\ObjectiveCollection
;
25
use
ILIAS\Setup\Objective
;
26
use
ilSetupAgent
;
27
use
ILIAS\Refinery\Factory
as Refinery;
28
use
ILIAS\Data\Factory
as DataFactory;
29
use
ilLanguage
;
30
36
class
ilSetupAgentTest
extends
TestCase
37
{
38
private
ilSetupAgent
$testObj
;
39
40
protected
function
setUp
(): void
41
{
42
$refinery
=
new
Refinery(
43
$this->createMock(DataFactory::class),
44
$this->createMock(ilLanguage::class)
45
);
46
47
parent::setUp();
48
$this->testObj =
new
ilSetupAgent
(
$refinery
, $this->createMock(DataFactory::class));
49
}
50
51
public
function
testGetNamedObjectives
(): void
52
{
53
$this->assertArrayHasKey(
54
"registerNICKey"
,
55
$this->testObj->getNamedObjectives(
new
NullConfig
())
56
);
57
}
58
59
public
function
testExecuteClosure
(): void
60
{
61
$objectiveConstructor = $this->testObj->getNamedObjectives(
new
NullConfig
())[
"registerNICKey"
];
62
$closureResult = $objectiveConstructor->create();
63
$this->assertInstanceOf(Objective::class, $closureResult);
64
}
65
}
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:21
ILIAS\Setup\NullConfig
A configuration with no content.
Definition:
NullConfig.php:27
ILIAS\Setup\ObjectiveCollection
A objective collection is a objective that is achieved once all subobjectives are achieved.
Definition:
ObjectiveCollection.php:27
ILIAS\Tests\Setup\ilSetupAgentTest
Definition:
ilSetupAgentTest.php:37
ILIAS\Tests\Setup\ilSetupAgentTest\testGetNamedObjectives
testGetNamedObjectives()
Definition:
ilSetupAgentTest.php:51
ILIAS\Tests\Setup\ilSetupAgentTest\$testObj
ilSetupAgent $testObj
Definition:
ilSetupAgentTest.php:38
ILIAS\Tests\Setup\ilSetupAgentTest\setUp
setUp()
Definition:
ilSetupAgentTest.php:40
ILIAS\Tests\Setup\ilSetupAgentTest\testExecuteClosure
testExecuteClosure()
Definition:
ilSetupAgentTest.php:59
ilLanguage
language handling
Definition:
class.ilLanguage.php:44
ilSetupAgent
Contains common objectives for the setup.
Definition:
class.ilSetupAgent.php:33
ILIAS\Repository\$refinery
Refinery Factory $refinery
Definition:
trait.BaseGUIRequest.php:36
ILIAS\Setup\Objective
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
AdminConfirmedObjective.php:21
ILIAS\Tests\Setup
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
tests
Setup
ilSetupAgentTest.php
Generated on Sun Nov 2 2025 22:02:04 for ILIAS by
1.9.4 (using
Doxyfile
)