19 declare(strict_types=1);
21 require_once(
"vendor/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../Base.php");
49 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Toast\\Factory",
$f);
51 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Toast\\Toast",
$f->standard(
'', $this->getIconFactory()->standard(
'',
'')));
52 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Toast\\Container",
$f->container());
58 public function testToast(
string $title,
string $description,
string $action): void
61 ->withDescription($description)
65 $this->assertNotNull($toast);
66 $this->assertEquals($title, $toast->getTitle());
67 $this->assertEquals($description, $toast->getDescription());
68 $this->assertEquals($action, $toast->getAction());
69 $this->assertCount(1, $toast->getLinks());
70 $this->assertInstanceOf(Link::class, $toast->getLinks()[0]);
71 $this->assertCount(0, $toast->withoutLinks()->getLinks());
72 $this->assertInstanceOf(Icon::class, $toast->getIcon());
85 $this->assertCount(1,
$container->getToasts());
86 $this->assertInstanceOf(Toast::class,
$container->getToasts()[0]);
87 $this->assertCount(0,
$container->withoutToasts()->getToasts());
93 [
'title',
'description',
'test.php'],
95 [
'"/><script>alert("hack")</script>',
'"/><script>alert("hack")</script>',
'test.php']
standard()
description: > This is an example, of how the Notification Slate is generated by assigning Notificat...
Interface Observer Contains several chained tasks and infos about them.
static getToastProvider()
testImplementsFactoryInterface()
testToast(string $title, string $description, string $action)
getToastProvider
testToastContainer(string $title, string $description)
getToastProvider