19declare(strict_types=1);
29require_once
"Base.php";
38 $user = $this->createMock(\ilObjUser::class);
39 $user->method(
'isAnonymous')->willReturn(!$logged_in);
40 $user->method(
'getId')->willReturn($logged_in ? 42 : 0);
42 $container = $this->createMock(Container::class);
52 $this->assertFalse(
$response->targetCanBeReached());
53 $this->assertNull(
$response->getURIPath());
60 $this->assertTrue(
$response->targetCanBeReached());
61 $this->assertNull(
$response->getURIPath());
68 $this->assertInstanceOf(CannotReach::class,
$response);
75 $this->assertInstanceOf(MaybeCanHandlerAfterLogin::class,
$response);
82 $this->assertSame(
'/ilias.php?ref_id=5',
$response->getURIPath());
84 $this->assertTrue(
$response->targetCanBeReached());
Customizing of pimple-DIC for ILIAS.
Returned by a Handler when the target exists but the CURRENT (logged-in) user has no permission to re...
Returned when the target is (or might be) reachable after the user logs in.
buildContext(bool $logged_in)
testLoginFirstReturnsCannotReachForLoggedInUser()
testCanReturnsCanHandleWithURIPathWithShift()
testLoginFirstReturnsMaybeCanHandlerAfterLoginForAnonymous()
testCanReturnsCanHandleWithURIPathWithoutShift()
testCannotReturnsCannotHandle()
testCannotReachReturnsCannotReach()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...