ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 

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.

References $dic.

Referenced by getDummyNotificationsProviderWithNotifications().

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 ChatMainBarProvider .
Class HTTPServicesTest.
$dic
Definition: result.php:13
Class ilAsqQuestionAuthoringFactory.
+ Here is the caller graph for this function:

◆ getDummyNotificationsProviderWithNotifications()

BaseNotificationSetUp::getDummyNotificationsProviderWithNotifications (   $notifications)

Definition at line 110 of file BaseNotificationSetUp.php.

References $dic, $provider, and getDIC().

Referenced by DummyProviderTest\testConstruct(), MainNotificationCollectorTest\testConstruct(), MainNotificationCollectorTest\testGetAmountOfNewNotifications(), MainNotificationCollectorTest\testGetAmountOfOldNotifications(), MainNotificationCollectorTest\testGetNotifications(), MainNotificationCollectorTest\testGetNotificationsIdentifiersAsArray(), and MainNotificationCollectorTest\testHasNotifications().

111  {
112  $dic = $this->getDIC();
113  $provider = new class($dic) extends AbstractNotificationProvider {
114  public function getNotifications() : array
115  {
116  return $this->notifications;
117  }
118  };
119  $provider->notifications = $notifications;
120  return $provider;
121  }
$dic
Definition: result.php:13
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUIFactory()

BaseNotificationSetUp::getUIFactory ( )

Definition at line 62 of file BaseNotificationSetUp.php.

References $factory.

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

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.
Class ChatMainBarProvider .
+ Here is the caller graph for this function:

◆ setUp()

BaseNotificationSetUp::setUp ( )
protected

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: