ILIAS  release_7 Revision v7.30-3-g800a261c036
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 42 of file BaseNotificationSetUp.php.

Member Function Documentation

◆ getDIC()

BaseNotificationSetUp::getDIC ( )

Definition at line 117 of file BaseNotificationSetUp.php.

118 {
119 $mocks = [
120 'ui' => $this->createMock(\ILIAS\DI\UIServices::class),
121 'ui.factory' => $this->createMock(\ILIAS\UI\Factory::class),
122 'provider_factory' => $this->createMock(ProviderFactory::class),
123 ];
124 return new class($mocks) extends ILIAS\DI\Container {
125 public function globalScreen() : Services
126 {
127 return new Services($this['provider_factory']);
128 }
129 };
130 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:19
Class HTTPServicesTest.
Class ChatMainBarProvider \MainMenu\Provider.
Class ilAsqQuestionAuthoringFactory.
Class Factory.

Referenced by getDummyNotificationsProviderWithNotifications().

+ Here is the caller graph for this function:

◆ getDummyNotificationsProviderWithNotifications()

BaseNotificationSetUp::getDummyNotificationsProviderWithNotifications (   $notifications)

◆ getUIFactory()

BaseNotificationSetUp::getUIFactory ( )

Definition at line 80 of file BaseNotificationSetUp.php.

81 {
82 $factory = new class() extends NoUIFactory {
83 public function item() : ILIAS\UI\Component\Item\Factory
84 {
85 return new I\Item\Factory();
86 }
87 public function symbol() : ILIAS\UI\Component\Symbol\Factory
88 {
89 return new I\Symbol\Factory(
90 new I\Symbol\Icon\Factory(),
91 new I\Symbol\Glyph\Factory(),
92 new I\Symbol\Avatar\Factory()
93 );
94 }
95 public function mainControls() : C\MainControls\Factory
96 {
97 return new I\MainControls\Factory(
98 $this->sig_gen,
99 new I\MainControls\Slate\Factory(
100 $this->sig_gen,
101 new Factory(),
102 new I\Symbol\Factory(
103 new I\Symbol\Icon\Factory(),
104 new I\Symbol\Glyph\Factory(),
105 new I\Symbol\Avatar\Factory()
106 )
107 )
108 );
109 }
110 };
111
112 $factory->sig_gen = Mockery::mock(I\SignalGeneratorInterface::class);
113 $factory->sig_gen->shouldReceive("create")->andReturn(new I\Signal("id"));
114 return $factory;
115 }

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

Reimplemented in StandardNotificationRendererTest.

Definition at line 67 of file BaseNotificationSetUp.php.

67 : void
68 {
69 parent::setUp();
70
71 $this->identification = new IdentificationFactory(new NullProviderFactory());
72 $this->provider = \Mockery::mock(NotificationProvider::class);
73 $this->provider->shouldReceive('getProviderNameForPresentation')->andReturn('Provider');
74
75 $this->id = $this->identification->core($this->provider)->identifier('dummy');
76
77 $this->factory = new NotificationFactory();
78 }
Class IdentificationFactory All elements in the GlobalScreen service must be identifiable for the sup...

Field Documentation

◆ $factory

BaseNotificationSetUp::$factory
protected

Definition at line 61 of file BaseNotificationSetUp.php.

Referenced by getUIFactory().

◆ $id

BaseNotificationSetUp::$id
protected

Definition at line 49 of file BaseNotificationSetUp.php.

◆ $identification

BaseNotificationSetUp::$identification
protected

Definition at line 57 of file BaseNotificationSetUp.php.

◆ $provider


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