ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
ExternalConditionObjectiveTest.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5
namespace
ILIAS\Tests\Setup
;
6
7
use
ILIAS\Setup
;
8
9
class
ExternalConditionObjectiveTest
extends
\PHPUnit\Framework\TestCase
10
{
11
public
function
setUp
() : void
12
{
13
$this->label_t =
"condition_true"
;
14
$this->t =
new
Setup\ExternalConditionObjective
(
15
$this->label_t,
16
function
(Setup\
Environment
$e
) {
17
return
true
;
18
}
19
);
20
$this->label_f =
"condition_false"
;
21
$this->f =
new
Setup\ExternalConditionObjective
(
22
$this->label_f,
23
function
(Setup\
Environment
$e) {
24
return
false
;
25
}
26
);
27
}
28
29
public
function
testGetHash
()
30
{
31
$this->assertIsString($this->t->getHash());
32
}
33
34
public
function
testHashIsDifferentForDifferentMessages
()
35
{
36
$this->assertNotEquals($this->t->getHash(), $this->f->getHash());
37
}
38
39
public
function
testGetLabel
()
40
{
41
$this->assertIsString($this->f->getLabel());
42
$this->assertEquals($this->label_f, $this->f->getLabel());
43
$this->assertEquals($this->label_t, $this->t->getLabel());
44
}
45
46
public
function
testIsNotable
()
47
{
48
$this->assertTrue($this->f->isNotable());
49
}
50
51
public
function
testGetPreconditions
()
52
{
53
$env = $this->createMock(Setup\Environment::class);
54
55
$pre = $this->f->getPreconditions($env);
56
$this->assertEquals([], $pre);
57
}
58
59
public
function
testAchieveFalse
()
60
{
61
$this->expectException(Setup\UnachievableException::class);
62
$env = $this->createMock(Setup\Environment::class);
63
$res
= $this->f->achieve($env);
64
}
65
66
67
public
function
testAchieveTrue
()
68
{
69
$env = $this->createMock(Setup\Environment::class);
70
$res
= $this->t->achieve($env);
71
$this->assertEquals($env,
$res
);
72
}
73
}
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\setUp
setUp()
Definition:
ExternalConditionObjectiveTest.php:11
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\testHashIsDifferentForDifferentMessages
testHashIsDifferentForDifferentMessages()
Definition:
ExternalConditionObjectiveTest.php:34
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\testAchieveTrue
testAchieveTrue()
Definition:
ExternalConditionObjectiveTest.php:67
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\testGetHash
testGetHash()
Definition:
ExternalConditionObjectiveTest.php:29
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\testAchieveFalse
testAchieveFalse()
Definition:
ExternalConditionObjectiveTest.php:59
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\testGetPreconditions
testGetPreconditions()
Definition:
ExternalConditionObjectiveTest.php:51
Vendor\Package\$e
$e
Definition:
example_cleaned.php:31
ILIAS\Setup\ExternalConditionObjective
A condition that can't be met by ILIAS itself needs to be met by some external means.
Definition:
ExternalConditionObjective.php:16
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\testGetLabel
testGetLabel()
Definition:
ExternalConditionObjectiveTest.php:39
ILIAS\Tests\Setup\ExternalConditionObjectiveTest\testIsNotable
testIsNotable()
Definition:
ExternalConditionObjectiveTest.php:46
ILIAS\Setup
Definition:
AchievementTracker.php:5
ILIAS\Setup\Environment
An environment holds resources to be used in the setup process.
Definition:
Environment.php:11
ILIAS\Tests\Setup
Definition:
AdminConfirmedObjectiveTest.php:5
ILIAS\Tests\Setup\ExternalConditionObjectiveTest
Definition:
ExternalConditionObjectiveTest.php:9
tests
Setup
ExternalConditionObjectiveTest.php
Generated on Fri Apr 18 2025 20:01:42 for ILIAS by
1.8.13 (using
Doxyfile
)