ILIAS
trunk Revision v11.0_alpha-1702-gfd3ecb7f852
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
StandardNotificationRendererTestTBD.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher
;
20
use
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\StandardNotificationRenderer
;
21
22
require_once(__DIR__ .
"/../../BaseNotificationSetUp.php"
);
23
27
class
StandardNotificationRendererTest
extends
BaseNotificationSetUp
28
{
29
use
Hasher
;
30
31
32
#[\Override]
33
protected
function
setUp
(): void
34
{
35
parent::setUp();
36
if
(!defined(
"ILIAS_HTTP_PATH"
)) {
37
define(
"ILIAS_HTTP_PATH"
,
"http://localhost"
);
38
}
39
}
40
41
public
function
testConstruct
(): void
42
{
43
$renderer
=
new
StandardNotificationRenderer
($this->
getUIFactory
());
44
$this->assertInstanceOf(StandardNotificationRenderer::class,
$renderer
);
45
}
46
47
48
public
function
testGetNotificationComponentForItem
(): void
49
{
50
$renderer
=
new
StandardNotificationRenderer
($this->
getUIFactory
());
51
$icon = $this->
getUIFactory
()->symbol()->icon()->standard(
"mail"
,
"mail"
);
52
$item = $this->
getUIFactory
()->item()->notification(
"hello"
, $icon);
53
54
$standard_notification = $this->
factory
->standard($this->
id
)->withNotificationItem($item);
55
56
$this->assertEquals($item,
$renderer
->getNotificationComponentForItem($standard_notification));
57
}
58
59
60
public
function
testGetNotificationComponentForItemWithCloseCallable
(): void
61
{
62
$renderer
=
new
StandardNotificationRenderer
($this->
getUIFactory
());
63
$icon = $this->
getUIFactory
()->symbol()->icon()->standard(
"mail"
,
"mail"
);
64
$item = $this->
getUIFactory
()->item()->notification(
"hello"
, $icon);
65
66
$standard_notification = $this->
factory
->standard($this->
id
)
67
->withNotificationItem($item)
68
->withClosedCallable(
function
():
void
{
69
});
70
71
$item = $item->withCloseAction(
"notify.php?mode=closed&item_id="
. $this->
hash
($this->
id
->serialize()));
72
$this->assertEquals($item,
$renderer
->getNotificationComponentForItem($standard_notification));
73
}
74
}
BaseNotificationSetUp\getUIFactory
getUIFactory()
Definition:
BaseNotificationSetUpTBD.php:79
StandardNotificationRendererTest\setUp
setUp()
Definition:
StandardNotificationRendererTestTBD.php:33
$renderer
$renderer
Definition:
build_bootstrap.php:83
StandardNotificationRendererTest\testConstruct
testConstruct()
Definition:
StandardNotificationRendererTestTBD.php:41
BaseNotificationSetUp
Class BaseNotificationSetUp.
Definition:
BaseNotificationSetUpTBD.php:42
factory
factory()
Definition:
UITestHelper.php:61
StandardNotificationRenderer
StandardNotificationRendererTest
Class StandardNotificationTest.
Definition:
StandardNotificationRendererTestTBD.php:27
Hasher
hash
StandardNotificationRendererTest\testGetNotificationComponentForItemWithCloseCallable
testGetNotificationComponentForItemWithCloseCallable()
Definition:
StandardNotificationRendererTestTBD.php:60
ILIAS\GlobalScreen\Scope\Notification\Collector\Renderer\StandardNotificationRenderer
Class StandardNotificationGroupRenderer.
Definition:
StandardNotificationRenderer.php:33
Hasher
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\GlobalScreen\Provider\id
id()
Definition:
PluginProviderHelper.php:54
StandardNotificationRendererTest\testGetNotificationComponentForItem
testGetNotificationComponentForItem()
Definition:
StandardNotificationRendererTestTBD.php:48
components
ILIAS
GlobalScreen
tests
Notification
Collector
Renderer
StandardNotificationRendererTestTBD.php
Generated on Thu Apr 3 2025 23:03:01 for ILIAS by
1.8.13 (using
Doxyfile
)