Definition at line 39 of file WiringTest.php.
◆ testAfterLogin()
| ILIAS\LegalDocuments\test\WiringTest::testAfterLogin |
( |
| ) |
|
Definition at line 48 of file WiringTest.php.
50 $map = $this->mock(Map::class);
51 $proc = $this->fail(...);
53 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'after-login', $proc], $map));
54 $this->assertSame($map, $instance->afterLogin($proc)->map());
◆ testCanReadInternalMails()
| ILIAS\LegalDocuments\test\WiringTest::testCanReadInternalMails |
( |
| ) |
|
Definition at line 145 of file WiringTest.php.
147 $map = $this->mock(Map::class);
148 $constraint = $this->mock(Constraint::class);
150 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'constrain-internal-mail', $constraint], $map));
151 $this->assertSame($map, $instance->canReadInternalMails($constraint)->map());
◆ testCanUseSoapApi()
| ILIAS\LegalDocuments\test\WiringTest::testCanUseSoapApi |
( |
| ) |
|
Definition at line 154 of file WiringTest.php.
156 $map = $this->mock(Map::class);
157 $constraint = $this->mock(Constraint::class);
159 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'use-soap-api', $constraint], $map));
160 $this->assertSame($map, $instance->canUseSoapApi($constraint)->map());
◆ testCanWithdraw()
| ILIAS\LegalDocuments\test\WiringTest::testCanWithdraw |
( |
| ) |
|
Definition at line 66 of file WiringTest.php.
68 $withdraw_process = $this->mock(WithdrawProcess::class);
70 $instance =
new Wiring($this->mock(SlotConstructor::class),
new Map());
72 $map = $instance->canWithdraw($withdraw_process)->map()->value();
82 $this->assertTrue(array_is_list($map[
'intercept']));
83 $this->assertTrue(array_is_list($map[
'show-on-login-page']));
84 $this->assertFalse(array_is_list($map[
'withdraw']));
85 $this->assertFalse(array_is_list($map[
'logout']));
86 $this->assertFalse(array_is_list($map[
'logout-text']));
◆ testConstruct()
| ILIAS\LegalDocuments\test\WiringTest::testConstruct |
( |
| ) |
|
Definition at line 43 of file WiringTest.php.
45 $this->assertInstanceOf(Wiring::class,
new Wiring($this->mock(SlotConstructor::class), $this->mock(Map::class)));
◆ testHasAgreement()
| ILIAS\LegalDocuments\test\WiringTest::testHasAgreement |
( |
| ) |
|
Definition at line 96 of file WiringTest.php.
98 $instance =
new Wiring($this->mock(SlotConstructor::class),
new Map());
99 $map = $instance->hasAgreement($this->mock(Agreement::class),
'bar')->map()->value();
106 ], array_keys($map));
108 $this->assertFalse(array_is_list($map[
'public-page']));
109 $this->assertFalse(array_is_list($map[
'agreement-form']));
110 $this->assertTrue(array_is_list($map[
'intercept']));
111 $this->assertTrue(array_is_list($map[
'goto']));
◆ testHasDocuments()
| ILIAS\LegalDocuments\test\WiringTest::testHasDocuments |
( |
| ) |
|
Definition at line 163 of file WiringTest.php.
165 $instance =
new Wiring($this->mock(SlotConstructor::class),
new Map());
166 $map = $instance->hasDocuments([],
new SelectionMap())->map()->value();
171 ], array_keys($map));
173 $this->assertFalse(array_is_list($map[
'document']));
174 $this->assertFalse(array_is_list($map[
'writable-document']));
◆ testHasHistory()
| ILIAS\LegalDocuments\test\WiringTest::testHasHistory |
( |
| ) |
|
Definition at line 114 of file WiringTest.php.
116 $document = $this->mock(ProvideDocument::class);
117 $history = $this->mock(ProvideHistory::class);
118 $slot = $this->mockMethod(SlotConstructor::class,
'history', [$document], $history);
119 $slot->method(
'id')->willReturn(
'foo');
120 $map = $this->mockTree(Map::class, [
'value' => [
'document' => [
'foo' => $document]]]);
121 $map->expects(self::once())->method(
'set')->with(
'history',
'foo', $history)->willReturn($map);
123 $instance =
new Wiring($slot, $map);
124 $this->assertSame($map, $instance->hasHistory()->map());
◆ testHasOnlineStatusFilter()
| ILIAS\LegalDocuments\test\WiringTest::testHasOnlineStatusFilter |
( |
| ) |
|
Definition at line 136 of file WiringTest.php.
138 $map = $this->mock(Map::class);
139 $proc = $this->fail(...);
141 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'filter-online-users', $proc], $map));
142 $this->assertSame($map, $instance->hasOnlineStatusFilter($proc)->map());
◆ testHasPublicApi()
| ILIAS\LegalDocuments\test\WiringTest::testHasPublicApi |
( |
| ) |
|
Definition at line 190 of file WiringTest.php.
192 $map = $this->mock(Map::class);
193 $public_api = $this->mock(PublicApi::class);
195 $instance =
new Wiring(
196 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
197 $this->mockMethod(Map::class,
'set', [
'public-api',
'foo', $public_api], $map)
200 $this->assertSame($map, $instance->hasPublicApi($public_api)->map());
◆ testHasPublicPage()
| ILIAS\LegalDocuments\test\WiringTest::testHasPublicPage |
( |
| ) |
|
Definition at line 203 of file WiringTest.php.
205 $map = $this->mock(Map::class);
206 $public_page = fn() => null;
208 $instance =
new Wiring(
209 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
210 $this->mockMethod(Map::class,
'set', [
'public-page',
'foo', $public_page], $map)
213 $this->assertSame($map, $instance->hasPublicPage($public_page)->map());
◆ testHasPublicPageWithGotoLink()
| ILIAS\LegalDocuments\test\WiringTest::testHasPublicPageWithGotoLink |
( |
| ) |
|
Definition at line 216 of file WiringTest.php.
218 $m = $this->mock(Map::class);
219 $map = $this->mockMethod(Map::class,
'add', [
'goto'], $m);
220 $public_page = fn() => null;
222 $instance =
new Wiring(
223 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
224 $this->mockMethod(Map::class,
'set', [
'public-page',
'foo', $public_page], $map)
227 $this->assertSame($m, $instance->hasPublicPage($public_page,
'foo')->map());
◆ testHasUserManagementFields()
| ILIAS\LegalDocuments\test\WiringTest::testHasUserManagementFields |
( |
| ) |
|
Definition at line 177 of file WiringTest.php.
179 $map = $this->mock(Map::class);
180 $proc = $this->fail(...);
182 $instance =
new Wiring(
183 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
184 $this->mockMethod(Map::class,
'set', [
'user-management-fields',
'foo', $proc], $map)
187 $this->assertSame($map, $instance->hasUserManagementFields($proc)->map());
◆ testMap()
| ILIAS\LegalDocuments\test\WiringTest::testMap |
( |
| ) |
|
Definition at line 230 of file WiringTest.php.
232 $map = $this->mock(Map::class);
233 $this->assertSame($map, (
new Wiring($this->mock(SlotConstructor::class), $map))->map());
◆ testOnSelfRegistration()
| ILIAS\LegalDocuments\test\WiringTest::testOnSelfRegistration |
( |
| ) |
|
Definition at line 127 of file WiringTest.php.
129 $map = $this->mock(Map::class);
130 $self_registration = $this->mock(SelfRegistration::class);
132 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'self-registration', $self_registration], $map));
133 $this->assertSame($map, $instance->onSelfRegistration($self_registration)->map());
◆ testShowInFooter()
| ILIAS\LegalDocuments\test\WiringTest::testShowInFooter |
( |
| ) |
|
Definition at line 57 of file WiringTest.php.
59 $map = $this->mock(Map::class);
60 $proc = $this->fail(...);
62 $instance =
new Wiring($this->mockTree(SlotConstructor::class, [
'id' =>
'foo']), $this->mockMethod(Map::class,
'set', [
'footer',
'foo', $proc], $map));
63 $this->assertSame($map, $instance->showInFooter($proc)->map());
◆ testShowOnLoginPage()
| ILIAS\LegalDocuments\test\WiringTest::testShowOnLoginPage |
( |
| ) |
|
Definition at line 89 of file WiringTest.php.
91 $proc = $this->fail(...);
92 $instance =
new Wiring($this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
new Map());
93 $this->assertSame([
'show-on-login-page' => [
'foo' => $proc]], $instance->showOnLoginPage($proc)->map()->value());
The documentation for this class was generated from the following file: