Definition at line 32 of file RoutingTest.php.
◆ testConstruct()
ILIAS\LegalDocuments\test\ConsumerToolbox\RoutingTest::testConstruct |
( |
| ) |
|
Definition at line 36 of file RoutingTest.php.
38 $this->assertInstanceOf(Routing::class,
new Routing(
39 $this->mock(ilCtrl::class),
40 $this->mock(SelectSetting::class),
◆ testCtrl()
ILIAS\LegalDocuments\test\ConsumerToolbox\RoutingTest::testCtrl |
( |
| ) |
|
Definition at line 46 of file RoutingTest.php.
References ILIAS\Repository\ctrl().
48 $ctrl = $this->mock(ilCtrl::class);
49 $this->assertSame($ctrl, (
new Routing($ctrl, $this->mock(SelectSetting::class), $this->fail(...), $this->fail(...)))->
ctrl());
◆ testLogoutUrl()
ILIAS\LegalDocuments\test\ConsumerToolbox\RoutingTest::testLogoutUrl |
( |
| ) |
|
Definition at line 52 of file RoutingTest.php.
54 $this->assertSame(
'dummy logout url', (
new Routing(
55 $this->mock(ilCtrl::class),
56 $this->mock(SelectSetting::class),
58 fn() =>
'dummy logout url'
◆ testRedirectToOriginalTarget()
ILIAS\LegalDocuments\test\ConsumerToolbox\RoutingTest::testRedirectToOriginalTarget |
( |
| ) |
|
Definition at line 84 of file RoutingTest.php.
References ILIAS\$setting, and null.
86 $setting = $this->mock(Setting::class);
87 $setting->method(
'value')->willReturn(
'some url');
88 $setting->expects(self::once())->method(
'update')->with(
null);
90 $session = $this->mock(SelectSetting::class);
91 $session->method(
'typed')->willReturnCallback(
function (
string $key, callable $proc) use (
$setting) {
92 $this->assertSame(
'orig_request_target', $key);
97 $ctrl = $this->mock(ilCtrl::class);
98 $ctrl->expects(self::once())->method(
'redirectToURL')->with(
'some url');
105 ))->redirectToOriginalTarget();
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testRedirectToStartingPage()
ILIAS\LegalDocuments\test\ConsumerToolbox\RoutingTest::testRedirectToStartingPage |
( |
| ) |
|
Definition at line 62 of file RoutingTest.php.
References null.
66 $session = $this->mock(SelectSetting::class);
67 $session->expects(self::once())->method(
'typed')->willReturnCallback(
function (
string $key, callable $proc) {
68 $this->assertSame(
'orig_request_target', $key);
69 return $this->mockTree(Setting::class, [
'value' =>
null]);
73 $this->mock(ilCtrl::class),
75 static function () use (&$called):
void {
79 ))->redirectToOriginalTarget();
81 $this->assertTrue($called);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
The documentation for this class was generated from the following file: