ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
◀ ilDoc Overview
ilCommonSetupAgentTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Tests\Setup
;
22
23
use PHPUnit\Framework\TestCase;
24
use
ILIAS\Setup\NullConfig
;
25
use
ILIAS\Setup\ObjectiveCollection
;
26
use
ILIAS\Setup\Objective
;
27
use
ilCommonSetupAgent
;
28
use
ILIAS\Refinery\Factory
as Refinery;
29
use
ILIAS\Data\Factory
as DataFactory;
30
use
ilLanguage
;
31
37
class
ilCommonSetupAgentTest
extends
TestCase
38
{
39
private
ilCommonSetupAgent
$testObj
;
40
41
protected
function
setUp
(): void
42
{
43
$refinery
=
new
Refinery
(
44
$this->createStub(DataFactory::class),
45
$this->createStub(ilLanguage::class)
46
);
47
48
parent::setUp
();
49
$this->testObj =
new
ilCommonSetupAgent
(
$refinery
, $this->createStub(DataFactory::class));
50
}
51
52
public
function
testGetNamedObjectives
(): void
53
{
54
$this->assertArrayHasKey(
55
"registerNICKey"
,
56
$this->testObj->getNamedObjectives(
new
NullConfig
())
57
);
58
}
59
60
public
function
testExecuteClosure
(): void
61
{
62
$objectiveConstructor = $this->testObj->getNamedObjectives(
new
NullConfig
())[
"registerNICKey"
];
63
$closureResult = $objectiveConstructor->create();
64
$this->assertInstanceOf(Objective::class, $closureResult);
65
}
66
}
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:36
ILIAS\Refinery
Definition:
Refinery.php:27
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\ilCommonSetupAgentTest
Definition:
ilCommonSetupAgentTest.php:38
ILIAS\Tests\Setup\ilCommonSetupAgentTest\testGetNamedObjectives
testGetNamedObjectives()
Definition:
ilCommonSetupAgentTest.php:52
ILIAS\Tests\Setup\ilCommonSetupAgentTest\setUp
setUp()
Definition:
ilCommonSetupAgentTest.php:41
ILIAS\Tests\Setup\ilCommonSetupAgentTest\testExecuteClosure
testExecuteClosure()
Definition:
ilCommonSetupAgentTest.php:60
ILIAS\Tests\Setup\ilCommonSetupAgentTest\$testObj
ilCommonSetupAgent $testObj
Definition:
ilCommonSetupAgentTest.php:39
ilCommonSetupAgent
Contains common objectives for the setup.
Definition:
class.ilCommonSetupAgent.php:32
ilLanguage
language handling
Definition:
class.ilLanguage.php:48
setUp
setUp()
Definition:
ilObjLanguageGuiTestSupport.php:34
ILIAS\Setup\Objective
Definition:
AdminConfirmedObjective.php:21
ILIAS\Tests\Setup
ILIAS\UI\examples\Layout\Page\Mail\$refinery
$refinery
Definition:
base.php:57
components
ILIAS
Setup
tests
ilCommonSetupAgentTest.php
Generated on Wed Nov 11 2026 23:09:03 for ILIAS by
1.9.4 (using
Doxyfile
)