ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
BaseNotificationSetUp Class Reference

Class BaseNotificationSetUp. More...

+ Inheritance diagram for BaseNotificationSetUp:
+ Collaboration diagram for BaseNotificationSetUp:

Public Member Functions

 getUIFactory ()
 
 getDIC ()
 
 getDummyNotificationsProviderWithNotifications ($notifications)
 

Protected Member Functions

 setUp ()
 @inheritDoc More...
 

Protected Attributes

 $id
 
 $provider
 
 $identification
 
 $factory
 

Detailed Description

Class BaseNotificationSetUp.

Some base Notification Work to be used in other tests for convenience

Definition at line 24 of file BaseNotificationSetUp.php.

Member Function Documentation

◆ getDIC()

BaseNotificationSetUp::getDIC ( )

Definition at line 99 of file BaseNotificationSetUp.php.

100 {
101 $dic = new class extends ILIAS\DI\Container {
102 public function globalScreen()
103 {
104 return new Services(Mockery::mock(ProviderFactory::class));
105 }
106 };
107 return $dic;
108 }
Class HTTPServicesTest.
Class ChatMainBarProvider \MainMenu\Provider.
Class ilAsqQuestionAuthoringFactory.
$dic
Definition: result.php:13

References $dic.

Referenced by getDummyNotificationsProviderWithNotifications().

+ Here is the caller graph for this function:

◆ getDummyNotificationsProviderWithNotifications()

BaseNotificationSetUp::getDummyNotificationsProviderWithNotifications (   $notifications)

◆ getUIFactory()

BaseNotificationSetUp::getUIFactory ( )

Definition at line 62 of file BaseNotificationSetUp.php.

63 {
64 $factory = new class extends NoUIFactory {
65 public function item()
66 {
67 return new I\Item\Factory();
68 }
69 public function symbol() : ILIAS\UI\Component\Symbol\Factory
70 {
71 return new I\Symbol\Factory(
72 new I\Symbol\Icon\Factory(),
73 new I\Symbol\Glyph\Factory(),
74 new I\Symbol\Avatar\Factory()
75 );
76 }
77 public function mainControls() : C\MainControls\Factory
78 {
79 return new I\MainControls\Factory(
80 $this->sig_gen,
81 new I\MainControls\Slate\Factory(
82 $this->sig_gen,
83 new \ILIAS\UI\Implementation\Component\Counter\Factory(),
84 new I\Symbol\Factory(
85 new I\Symbol\Icon\Factory(),
86 new I\Symbol\Glyph\Factory(),
87 new I\Symbol\Avatar\Factory()
88 )
89 )
90 );
91 }
92 };
93
94 $factory->sig_gen = Mockery::mock(I\SignalGeneratorInterface::class);
95 $factory->sig_gen->shouldReceive("create")->andReturn(new I\Signal("id"));
96 return $factory;
97 }
Class Factory.

References $factory.

Referenced by StandardNotificationGroupRendererTest\testConstruct(), StandardNotificationRendererTest\testConstruct(), StandardNotificationGroupRendererTest\testGetNotificationComponentForItem(), StandardNotificationRendererTest\testGetNotificationComponentForItem(), StandardNotificationRendererTest\testGetNotificationComponentForItemWithCloseCallable(), and StandardNotificationTest\testWithNotificationItem().

+ Here is the caller graph for this function:

◆ setUp()

BaseNotificationSetUp::setUp ( )
protected

@inheritDoc

Definition at line 49 of file BaseNotificationSetUp.php.

49 : void
50 {
51 parent::setUp();
52
53 $this->identification = new IdentificationFactory(new NullProviderFactory());
54 $this->provider = \Mockery::mock(NotificationProvider::class);
55 $this->provider->shouldReceive('getProviderNameForPresentation')->andReturn('Provider');
56
57 $this->id = $this->identification->core($this->provider)->identifier('dummy');
58
59 $this->factory = new NotificationFactory();
60 }

Field Documentation

◆ $factory

BaseNotificationSetUp::$factory
protected

Definition at line 43 of file BaseNotificationSetUp.php.

Referenced by getUIFactory().

◆ $id

BaseNotificationSetUp::$id
protected

Definition at line 31 of file BaseNotificationSetUp.php.

◆ $identification

BaseNotificationSetUp::$identification
protected

Definition at line 39 of file BaseNotificationSetUp.php.

◆ $provider


The documentation for this class was generated from the following file: