ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
◀ ilDoc Overview
ObjectiveConstructorTest.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\ObjectiveConstructor
;
25
use
ILIAS\Setup\ObjectiveCollection
;
26
use
ILIAS\Setup\Objective\NullObjective
;
27
33
class
ObjectiveConstructorTest
extends
TestCase
34
{
35
private
ObjectiveConstructor
$testObj
;
36
private
ObjectiveCollection
$objectiveCollection
;
37
private \Closure
$closure
;
38
39
protected
function
setUp
(): void
40
{
41
parent::setUp
();
42
$this->objectiveCollection =
new
ObjectiveCollection
(
43
""
,
44
false
,
45
new
NullObjective
()
46
);
47
48
$this->closure =
function
():
ObjectiveCollection
{
49
return
$this->objectiveCollection
;
50
};
51
52
$this->testObj =
new
ObjectiveConstructor
(
53
"My description"
,
54
$this->closure
55
);
56
}
57
58
public
function
testGetDescription
(): void
59
{
60
$this->assertEquals(
61
"My description"
,
62
$this->testObj->getDescription()
63
);
64
}
65
66
public
function
testCreate
(): void
67
{
68
$this->assertEquals($this->objectiveCollection, $this->testObj->create());
69
}
70
}
ILIAS\Setup\ObjectiveCollection
A objective collection is a objective that is achieved once all subobjectives are achieved.
Definition:
ObjectiveCollection.php:27
ILIAS\Setup\ObjectiveConstructor
Definition:
ObjectiveConstructor.php:31
ILIAS\Setup\Objective\NullObjective
A non-objective, nothing to do to achieve it...
Definition:
NullObjective.php:29
ILIAS\Tests\Setup\ObjectiveConstructorTest
Definition:
ObjectiveConstructorTest.php:34
ILIAS\Tests\Setup\ObjectiveConstructorTest\$objectiveCollection
ObjectiveCollection $objectiveCollection
Definition:
ObjectiveConstructorTest.php:36
ILIAS\Tests\Setup\ObjectiveConstructorTest\$closure
Closure $closure
Definition:
ObjectiveConstructorTest.php:37
ILIAS\Tests\Setup\ObjectiveConstructorTest\$testObj
ObjectiveConstructor $testObj
Definition:
ObjectiveConstructorTest.php:35
ILIAS\Tests\Setup\ObjectiveConstructorTest\setUp
setUp()
Definition:
ObjectiveConstructorTest.php:39
ILIAS\Tests\Setup\ObjectiveConstructorTest\testCreate
testCreate()
Definition:
ObjectiveConstructorTest.php:66
ILIAS\Tests\Setup\ObjectiveConstructorTest\testGetDescription
testGetDescription()
Definition:
ObjectiveConstructorTest.php:58
setUp
setUp()
Definition:
ilObjLanguageGuiTestSupport.php:34
ILIAS\Tests\Setup
components
ILIAS
Setup
tests
ObjectiveConstructorTest.php
Generated on Wed Nov 11 2026 23:09:03 for ILIAS by
1.9.4 (using
Doxyfile
)