ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
◀ 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
ToastCollectorTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\GlobalScreen\Scope\Toast\Collector\ToastCollector
;
22
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
23
24
require_once(__DIR__ .
"/../BaseToastSetUp.php"
);
25
26
class
ToastCollectorTest
extends
BaseToastSetUp
27
{
28
public
function
testConstruct
(): void
29
{
30
$provider
= $this->
getDummyToastProviderWithToasts
([]);
31
$collector =
new
ToastCollector
([
$provider
]);
32
$this->assertInstanceOf(ToastCollector::class, $collector);
33
}
34
35
public
function
testGetToasts
(): void
36
{
37
$provider
= $this->
getDummyToastProviderWithToasts
([]);
38
$collector =
new
ToastCollector
([
$provider
]);
39
$this->assertEquals([], $collector->getToasts());
40
41
$id_one = $this->createMock(IdentificationInterface::class);
42
$id_two = $this->createMock(IdentificationInterface::class);
43
44
$toast1 = $this->
factory
->standard(
45
$id_one,
46
'Test Toast 1'
47
);
48
49
$toast2 = $this->
factory
->standard(
50
$id_two,
51
'Test Toast 2'
52
);
53
54
$provider
= $this->
getDummyToastProviderWithToasts
([$toast1, $toast2]);
55
$collector =
new
ToastCollector
([
$provider
]);
56
$this->assertEquals([$toast1, $toast2], $collector->getToasts());
57
}
58
}
ToastCollectorTest
Definition:
ToastCollectorTest.php:26
BaseToastSetUp
Definition:
BaseToastSetUp.php:34
factory
factory()
Definition:
UITestHelper.php:61
ILIAS\GlobalScreen\Scope\Toast\Collector\ToastCollector
Definition:
ToastCollector.php:28
IdentificationInterface
BaseToastSetUp\$provider
ToastProvider $provider
Definition:
BaseToastSetUp.php:39
BaseToastSetUp\getDummyToastProviderWithToasts
getDummyToastProviderWithToasts(array $toasts)
Definition:
BaseToastSetUp.php:70
ToastCollectorTest\testGetToasts
testGetToasts()
Definition:
ToastCollectorTest.php:35
ToastCollector
ToastCollectorTest\testConstruct
testConstruct()
Definition:
ToastCollectorTest.php:28
components
ILIAS
GlobalScreen
tests
Toast
Collector
ToastCollectorTest.php
Generated on Sat Apr 5 2025 23:03:19 for ILIAS by
1.8.13 (using
Doxyfile
)