ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
ilCommonSetupAgentTest.php
Go to the documentation of this file.
1
<?php
2
19
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
ilCommonSetupAgent
;
27
use
ILIAS\Refinery\Factory
as Refinery;
28
use
ILIAS\Data\Factory
as DataFactory;
29
use
ilLanguage
;
30
36
class
ilCommonSetupAgentTest
extends
TestCase
37
{
38
private
ilCommonSetupAgent
$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
ilCommonSetupAgent
(
$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:36
ILIAS\Refinery
Definition:
Refinery.php:24
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:37
ILIAS\Tests\Setup\ilCommonSetupAgentTest\testGetNamedObjectives
testGetNamedObjectives()
Definition:
ilCommonSetupAgentTest.php:51
ILIAS\Tests\Setup\ilCommonSetupAgentTest\setUp
setUp()
Definition:
ilCommonSetupAgentTest.php:40
ILIAS\Tests\Setup\ilCommonSetupAgentTest\testExecuteClosure
testExecuteClosure()
Definition:
ilCommonSetupAgentTest.php:59
ILIAS\Tests\Setup\ilCommonSetupAgentTest\$testObj
ilCommonSetupAgent $testObj
Definition:
ilCommonSetupAgentTest.php:38
ilCommonSetupAgent
Contains common objectives for the setup.
Definition:
class.ilCommonSetupAgent.php:32
ilLanguage
language handling
Definition:
class.ilLanguage.php:43
ILIAS\Setup\Objective
Definition:
AdminConfirmedObjective.php:21
ILIAS\Tests\Setup
ILIAS\UI\examples\Layout\Page\Standard\$refinery
$refinery
Definition:
ui.php:137
components
ILIAS
Setup
tests
ilCommonSetupAgentTest.php
Generated on Sat Oct 18 2025 23:03:40 for ILIAS by
1.9.4 (using
Doxyfile
)