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