ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
NotificationFactoryTest.php
Go to the documentation of this file.
1<?php
4
5require_once(__DIR__ . "/../BaseNotificationSetUp.php");
6
11{
12 public function testAvailableMethods()
13 {
14 $r = new ReflectionClass($this->factory);
15
16 $methods = [];
17 foreach ($r->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
18 $methods[] = $method->getName();
19 }
20 sort($methods);
21 $this->assertEquals(
22 $methods,
23 [
24 0 => 'standard',
25 1 => 'standardGroup',
26 ]
27 );
28 }
29
30
31 public function testCorrectReturn()
32 {
33 $this->assertInstanceOf(StandardNotification::class, $this->factory->standard($this->id));
34 $this->assertInstanceOf(StandardNotificationGroup::class, $this->factory->standardGroup($this->id));
35 }
36}
Class BaseNotificationSetUp.
An exception for terminatinating execution or to throw for unit testing.
Class NotificationFactoryTest.