ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
SlotTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
38 
39 require_once __DIR__ . '/../ContainerMock.php';
40 
41 class SlotTest extends TestCase
42 {
43  use ContainerMock;
44 
45  public function testConstruct(): void
46  {
47  $this->assertInstanceOf(Slot::class, new Slot(
48  'foo',
49  $this->mock(Blocks::class),
50  $this->mock(LazyProvide::class),
51  $this->mock(Container::class)
52  ));
53  }
54 
55  public function testShowOnLoginPage(): void
56  {
57  $instance = new Slot(
58  'foo',
59  $this->mock(Blocks::class),
60  $this->mock(LazyProvide::class),
61  $this->mock(Container::class)
62  );
63 
64  $this->assertInstanceOf(ShowOnLoginPage::class, $instance->showOnLoginPage());
65  }
66 
67  public function testWithdrawProcess(): void
68  {
69  $instance = new Slot(
70  'foo',
71  $this->mock(Blocks::class),
72  $this->mock(LazyProvide::class),
73  $this->mock(Container::class)
74  );
75 
76  $this->assertInstanceOf(WithdrawProcess::class, $instance->withdrawProcess($this->mock(User::class), $this->mock(Settings::class), $this->fail(...)));
77  }
78 
79  public function testAgreement(): void
80  {
81  $instance = new Slot(
82  'foo',
83  $this->mock(Blocks::class),
84  $this->mock(LazyProvide::class),
85  $this->mock(Container::class)
86  );
87  $this->assertInstanceOf(Agreement::class, $instance->agreement($this->mock(User::class), $this->mock(Settings::class)));
88  }
89 
90  public function testModifyFooter(): void
91  {
92  $instance = new Slot(
93  'foo',
94  $this->mock(Blocks::class),
95  $this->mock(LazyProvide::class),
96  $this->mock(Container::class)
97  );
98 
99  $this->assertInstanceOf(ModifyFooter::class, $instance->modifyFooter($this->mock(User::class)));
100  }
101 
102  public function testSelfRegistration(): void
103  {
104  $instance = new Slot(
105  'foo',
106  $this->mock(Blocks::class),
107  $this->mock(LazyProvide::class),
108  $this->mock(Container::class)
109  );
110 
111  $this->assertInstanceOf(SelfRegistration::class, $instance->selfRegistration($this->mock(User::class), $this->fail(...)));
112  }
113 
114  public function testOnlineStatusFilter(): void
115  {
116  $instance = $instance = new Slot(
117  'foo',
118  $this->mock(Blocks::class),
119  $this->mock(LazyProvide::class),
120  $this->mock(Container::class)
121  );
122 
123  $this->assertInstanceOf(OnlineStatusFilter::class, $instance->onlineStatusFilter($this->fail(...)));
124  }
125 }