ILIAS  release_7 Revision v7.30-3-g800a261c036
NotificationFactoryTest.php
Go to the documentation of this file.
1<?php
2
21
22require_once(__DIR__ . "/../BaseNotificationSetUp.php");
23
28{
29 public function testAvailableMethods() : void
30 {
31 $r = new ReflectionClass($this->factory);
32
33 $methods = [];
34 foreach ($r->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
35 $methods[] = $method->getName();
36 }
37 sort($methods);
38 $this->assertEquals(
39 [
40 0 => 'administrative',
41 1 => 'standard',
42 2 => 'standardGroup',
43 ],
44 $methods
45 );
46 }
47
48
49 public function testCorrectReturn() : void
50 {
51 $this->assertInstanceOf(StandardNotification::class, $this->factory->standard($this->id));
52 $this->assertInstanceOf(StandardNotificationGroup::class, $this->factory->standardGroup($this->id));
53 }
54}
Class BaseNotificationSetUp.
An exception for terminatinating execution or to throw for unit testing.
Class StandardNotificationGroup Groups a set of Notification.
Class Notification The default Notification mapping currently to one UI Notification Item component.
Class NotificationFactoryTest.