ILIAS
release_8 Revision v8.19
◀ 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
n
o
p
r
s
t
u
v
w
x
+
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
j
l
m
p
s
t
u
+
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
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
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\IdentificationFactory
;
23
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
24
25
require_once(__DIR__ .
"/../BaseToastSetUp.php"
);
26
27
class
ToastCollectorTest
extends
BaseToastSetUp
28
{
29
public
function
testConstruct
(): void
30
{
31
$provider
= $this->
getDummyToastProviderWithToasts
([]);
32
$collector =
new
ToastCollector
([
$provider
]);
33
$this->assertInstanceOf(ToastCollector::class, $collector);
34
}
35
36
public
function
testGetToasts
(): void
37
{
38
$provider
= $this->
getDummyToastProviderWithToasts
([]);
39
$collector =
new
ToastCollector
([
$provider
]);
40
$this->assertEquals([], $collector->getToasts());
41
42
$id_one = $this->createMock(IdentificationInterface::class);
43
$id_two = $this->createMock(IdentificationInterface::class);
44
45
$toast1 = $this->factory->standard(
46
$id_one,
47
'Test Toast 1'
48
);
49
50
$toast2 = $this->factory->standard(
51
$id_two,
52
'Test Toast 2'
53
);
54
55
$provider
= $this->
getDummyToastProviderWithToasts
([$toast1, $toast2]);
56
$collector =
new
ToastCollector
([
$provider
]);
57
$this->assertEquals([$toast1, $toast2], $collector->getToasts());
58
}
59
}
ToastCollectorTest
Definition:
ToastCollectorTest.php:27
BaseToastSetUp
Definition:
BaseToastSetUp.php:32
ILIAS\GlobalScreen\Scope\Toast\Collector\ToastCollector
Definition:
ToastCollector.php:27
IdentificationInterface
BaseToastSetUp\$provider
ToastProvider $provider
Definition:
BaseToastSetUp.php:37
BaseToastSetUp\getDummyToastProviderWithToasts
getDummyToastProviderWithToasts(array $toasts)
Definition:
BaseToastSetUp.php:68
ToastCollectorTest\testGetToasts
testGetToasts()
Definition:
ToastCollectorTest.php:36
IdentificationFactory
ToastCollector
ToastCollectorTest\testConstruct
testConstruct()
Definition:
ToastCollectorTest.php:29
tests
GlobalScreen
Toast
Collector
ToastCollectorTest.php
Generated on Sat Apr 5 2025 22:02:47 for ILIAS by
1.8.13 (using
Doxyfile
)