Definition at line 38 of file WiringTest.php.
◆ testAfterLogin()
ILIAS\LegalDocuments\test\WiringTest::testAfterLogin |
( |
| ) |
|
Definition at line 47 of file WiringTest.php.
49 $map = $this->mock(Map::class);
50 $proc = $this->fail(...);
52 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'after-login', $proc], $map));
53 $this->assertSame($map, $instance->afterLogin($proc)->map());
◆ testCanReadInternalMails()
ILIAS\LegalDocuments\test\WiringTest::testCanReadInternalMails |
( |
| ) |
|
Definition at line 142 of file WiringTest.php.
144 $map = $this->mock(Map::class);
145 $constraint = $this->mock(Constraint::class);
147 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'constrain-internal-mail', $constraint], $map));
148 $this->assertSame($map, $instance->canReadInternalMails($constraint)->map());
◆ testCanUseSoapApi()
ILIAS\LegalDocuments\test\WiringTest::testCanUseSoapApi |
( |
| ) |
|
Definition at line 151 of file WiringTest.php.
153 $map = $this->mock(Map::class);
154 $constraint = $this->mock(Constraint::class);
156 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'use-soap-api', $constraint], $map));
157 $this->assertSame($map, $instance->canUseSoapApi($constraint)->map());
◆ testCanWithdraw()
ILIAS\LegalDocuments\test\WiringTest::testCanWithdraw |
( |
| ) |
|
Definition at line 65 of file WiringTest.php.
67 $withdraw_process = $this->mock(WithdrawProcess::class);
69 $instance =
new Wiring($this->mock(SlotConstructor::class),
new Map());
71 $map = $instance->canWithdraw($withdraw_process)->map()->value();
80 $this->assertTrue(array_is_list($map[
'intercept']));
81 $this->assertTrue(array_is_list($map[
'show-on-login-page']));
82 $this->assertFalse(array_is_list($map[
'withdraw']));
83 $this->assertFalse(array_is_list($map[
'logout-text']));
◆ testConstruct()
ILIAS\LegalDocuments\test\WiringTest::testConstruct |
( |
| ) |
|
Definition at line 42 of file WiringTest.php.
44 $this->assertInstanceOf(Wiring::class,
new Wiring($this->mock(SlotConstructor::class), $this->mock(Map::class)));
◆ testHasAgreement()
ILIAS\LegalDocuments\test\WiringTest::testHasAgreement |
( |
| ) |
|
Definition at line 93 of file WiringTest.php.
95 $instance =
new Wiring($this->mock(SlotConstructor::class),
new Map());
96 $map = $instance->hasAgreement($this->mock(Agreement::class),
'bar')->map()->value();
103 ], array_keys($map));
105 $this->assertFalse(array_is_list($map[
'public-page']));
106 $this->assertFalse(array_is_list($map[
'agreement-form']));
107 $this->assertTrue(array_is_list($map[
'intercept']));
108 $this->assertTrue(array_is_list($map[
'goto']));
◆ testHasDocuments()
ILIAS\LegalDocuments\test\WiringTest::testHasDocuments |
( |
| ) |
|
Definition at line 160 of file WiringTest.php.
162 $instance =
new Wiring($this->mock(SlotConstructor::class),
new Map());
163 $map = $instance->hasDocuments([],
new SelectionMap())->map()->value();
168 ], array_keys($map));
170 $this->assertFalse(array_is_list($map[
'document']));
171 $this->assertFalse(array_is_list($map[
'writable-document']));
◆ testHasHistory()
ILIAS\LegalDocuments\test\WiringTest::testHasHistory |
( |
| ) |
|
Definition at line 111 of file WiringTest.php.
113 $document = $this->mock(ProvideDocument::class);
114 $history = $this->mock(ProvideHistory::class);
115 $slot = $this->mockMethod(SlotConstructor::class,
'history', [$document], $history);
116 $slot->method(
'id')->willReturn(
'foo');
117 $map = $this->mockTree(Map::class, [
'value' => [
'document' => [
'foo' => $document]]]);
118 $map->expects(self::once())->method(
'set')->with(
'history',
'foo', $history)->willReturn($map);
120 $instance =
new Wiring($slot, $map);
121 $this->assertSame($map, $instance->hasHistory()->map());
◆ testHasOnlineStatusFilter()
ILIAS\LegalDocuments\test\WiringTest::testHasOnlineStatusFilter |
( |
| ) |
|
Definition at line 133 of file WiringTest.php.
135 $map = $this->mock(Map::class);
136 $proc = $this->fail(...);
138 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'filter-online-users', $proc], $map));
139 $this->assertSame($map, $instance->hasOnlineStatusFilter($proc)->map());
◆ testHasPublicApi()
ILIAS\LegalDocuments\test\WiringTest::testHasPublicApi |
( |
| ) |
|
Definition at line 187 of file WiringTest.php.
189 $map = $this->mock(Map::class);
190 $public_api = $this->mock(PublicApi::class);
192 $instance =
new Wiring(
193 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
194 $this->mockMethod(Map::class,
'set', [
'public-api',
'foo', $public_api], $map)
197 $this->assertSame($map, $instance->hasPublicApi($public_api)->map());
◆ testHasPublicPage()
ILIAS\LegalDocuments\test\WiringTest::testHasPublicPage |
( |
| ) |
|
Definition at line 200 of file WiringTest.php.
References null.
202 $map = $this->mock(Map::class);
203 $public_page = fn() =>
null;
205 $instance =
new Wiring(
206 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
207 $this->mockMethod(Map::class,
'set', [
'public-page',
'foo', $public_page], $map)
210 $this->assertSame($map, $instance->hasPublicPage($public_page)->map());
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testHasPublicPageWithGotoLink()
ILIAS\LegalDocuments\test\WiringTest::testHasPublicPageWithGotoLink |
( |
| ) |
|
Definition at line 213 of file WiringTest.php.
References null.
215 $m = $this->mock(Map::class);
216 $map = $this->mockMethod(Map::class,
'add', [
'goto'], $m);
217 $public_page = fn() =>
null;
219 $instance =
new Wiring(
220 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
221 $this->mockMethod(Map::class,
'set', [
'public-page',
'foo', $public_page], $map)
224 $this->assertSame($m, $instance->hasPublicPage($public_page,
'foo')->map());
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testHasUserManagementFields()
ILIAS\LegalDocuments\test\WiringTest::testHasUserManagementFields |
( |
| ) |
|
Definition at line 174 of file WiringTest.php.
176 $map = $this->mock(Map::class);
177 $proc = $this->fail(...);
179 $instance =
new Wiring(
180 $this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
181 $this->mockMethod(Map::class,
'set', [
'user-management-fields',
'foo', $proc], $map)
184 $this->assertSame($map, $instance->hasUserManagementFields($proc)->map());
◆ testMap()
ILIAS\LegalDocuments\test\WiringTest::testMap |
( |
| ) |
|
Definition at line 227 of file WiringTest.php.
229 $map = $this->mock(Map::class);
230 $this->assertSame($map, (
new Wiring($this->mock(SlotConstructor::class), $map))->map());
◆ testOnSelfRegistration()
ILIAS\LegalDocuments\test\WiringTest::testOnSelfRegistration |
( |
| ) |
|
Definition at line 124 of file WiringTest.php.
126 $map = $this->mock(Map::class);
127 $self_registration = $this->mock(SelfRegistration::class);
129 $instance =
new Wiring($this->mock(SlotConstructor::class), $this->mockMethod(Map::class,
'add', [
'self-registration', $self_registration], $map));
130 $this->assertSame($map, $instance->onSelfRegistration($self_registration)->map());
◆ testShowInFooter()
ILIAS\LegalDocuments\test\WiringTest::testShowInFooter |
( |
| ) |
|
Definition at line 56 of file WiringTest.php.
58 $map = $this->mock(Map::class);
59 $proc = $this->fail(...);
61 $instance =
new Wiring($this->mockTree(SlotConstructor::class, [
'id' =>
'foo']), $this->mockMethod(Map::class,
'set', [
'footer',
'foo', $proc], $map));
62 $this->assertSame($map, $instance->showInFooter($proc)->map());
◆ testShowOnLoginPage()
ILIAS\LegalDocuments\test\WiringTest::testShowOnLoginPage |
( |
| ) |
|
Definition at line 86 of file WiringTest.php.
88 $proc = $this->fail(...);
89 $instance =
new Wiring($this->mockTree(SlotConstructor::class, [
'id' =>
'foo']),
new Map());
90 $this->assertSame([
'show-on-login-page' => [
'foo' => $proc]], $instance->showOnLoginPage($proc)->map()->value());
The documentation for this class was generated from the following file: