Definition at line 57 of file ConductorTest.php.
 
◆ agreement()
  
  
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::agreement  | 
          ( | 
          string  | 
          $method,  | 
         
        
           | 
           | 
          string  | 
          $gui,  | 
         
        
           | 
           | 
          string  | 
          $key,  | 
         
        
           | 
           | 
          ?ilGlobalTemplateInterface  | 
          $main_template = null  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Definition at line 342 of file ConductorTest.php.
References $container.
Referenced by ILIAS\LegalDocuments\test\ConductorTest\testAgree(), ILIAS\LegalDocuments\test\ConductorTest\testAgreeContent(), and ILIAS\LegalDocuments\test\ConductorTest\testWithdraw().
  344         $constraint = $this->mock(Constraint::class);
   346         $ctrl = $this->mock(ilCtrl::class);
   347         $ctrl->expects(self::once())->method(
'setParameterByClass')->with($gui, 
'id', 
'foo');
   349         $container = $this->mockTree(Container::class, [
   350             'refinery' => [
'to' => [
'string' => $constraint]],
   351             'http' => [
'wrapper' => [
'query' => $this->mockMethod(ArrayBasedRequestWrapper::class, 
'retrieve', [
'id', $constraint], 
'foo')]],
   353                 'mainTemplate' => $main_template ?? $this->mock(ilGlobalTemplateInterface::class),
   354                 'renderer' => $this->mock(Renderer::class),
   359         $fragment = $this->mockMethod(PageFragment::class, 
'render', [
$container->ui()->mainTemplate(), 
$container->ui()->renderer()], 
'rendered');
   361         $internal = $this->mockMethod(Internal::class, 
'get', [
$key, 
'foo'], 
function (
string $g, 
string $cmd) use ($fragment, $gui): Result {
   362             $this->assertSame($gui, $g);
   363             $this->assertSame(
'some cmd', $cmd);
   364             return new Ok($fragment);
   367         $instance = 
new Conductor(
$container, $internal, $this->mock(Routing::class));
   369         return $instance->$method($gui, 
'some cmd');
 
 
 
 
◆ agreeTypes()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::agreeTypes  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 334 of file ConductorTest.php.
  337             'Form type' => [ilLegalDocumentsAgreementGUI::class, 
'agreement-form'],
   338             'Public type' => [
'foo', 
'public-page'],
  
 
 
◆ testAfterLogin()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testAfterLogin  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 258 of file ConductorTest.php.
  260         $called = [
false, 
false];
   262         $internal = $this->mockMethod(Internal::class, 
'all', [
'after-login'], [
   263             function () use (&$called): 
void {
   266             function () use (&$called): 
void {
   271         $instance = 
new Conductor($this->mock(Container::class), $internal, $this->mock(Routing::class));
   273         $instance->afterLogin();
   275         $this->assertSame([
true, 
true], $called);
  
 
 
◆ testAgree()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testAgree  | 
          ( | 
          string  | 
          $gui,  | 
        
        
           | 
           | 
          string  | 
          $key  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
agreeTypes 
Definition at line 163 of file ConductorTest.php.
References ILIAS\LegalDocuments\test\ConductorTest\agreement().
  165         $main_template = $this->mock(ilGlobalTemplateInterface::class);
   166         $main_template->expects(self::once())->method(
'setContent')->with(
'rendered');
 agreement(string $method, string $gui, string $key, ?ilGlobalTemplateInterface $main_template=null)
 
 
 
 
◆ testAgreeContent()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testAgreeContent  | 
          ( | 
          string  | 
          $gui,  | 
        
        
           | 
           | 
          string  | 
          $key  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ testCanUseSoapApi()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testCanUseSoapApi  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 241 of file ConductorTest.php.
References $container.
  244             'foo' => $this->mock(Constraint::class),
   245             'bar' => $this->mock(Constraint::class),
   248         $container = $this->mockTree(Container::class, [
   249             'refinery' => [
'in' => $this->mockMethod(InGroup::class, 
'series', [array_values($constraints)], $this->mock(Transformation::class))]
   252         $internal = $this->mockMethod(Internal::class, 
'all', [
'use-soap-api'], $constraints);
   254         $instance = 
new Conductor(
$container, $internal, $this->mock(Routing::class));
   255         $this->assertInstanceOf(Transformation::class, $instance->canUseSoapApi());
 
 
 
 
◆ testConstruct()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testConstruct  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 61 of file ConductorTest.php.
   63         $this->assertInstanceOf(Conductor::class, 
new Conductor($this->mock(Container::class), $this->mock(Internal::class), $this->mock(Routing::class)));
  
 
 
◆ testFindGotoLink()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testFindGotoLink  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 278 of file ConductorTest.php.
References Vendor\Package\$foo.
  280         $foo = $this->mock(Target::class);
   281         $internal = $this->mockMethod(Internal::class, 
'all', [
'goto'], [
   282             $this->mockTree(GotoLink::class, [
'name' => 
'bar']),
   283             $this->mockTree(GotoLink::class, [
'name' => 
'foo', 
'target' => 
$foo]),
   286         $instance = 
new Conductor($this->mock(Container::class), $internal, $this->mock(Routing::class));
   288         $target = $instance->findGotoLink(
'foo');
   289         $this->assertTrue($target->isOk());
   290         $this->assertSame(
$foo, $target->value());
 
 
 
 
◆ testIntercepting()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testIntercepting  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 294 of file ConductorTest.php.
  297             'foo' => $this->mock(Intercept::class),
   298             'bar' => $this->mock(Intercept::class)
   301         $internal = $this->mockMethod(Internal::class, 
'all', [
'intercept'], $intercepting);
   303         $instance = 
new Conductor($this->mock(Container::class), $internal, $this->mock(Routing::class));
   304         $this->assertSame($intercepting, $instance->intercepting());
  
 
 
◆ testLoginPageHTML()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testLoginPageHTML  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 96 of file ConductorTest.php.
References $container, and $space.
   99             $this->mock(Component::class),
   100             $this->mock(Component::class),
   103         $space = $this->mock(Legacy::class);
   105         $container = $this->mockTree(Container::class, [
   107                 'renderer' => $this->mockMethod(Renderer::class, 
'render', [
   113         $internal = $this->mockMethod(Internal::class, 
'get', [
'show-on-login-page', 
'foo'], fn() => $components);
   115         $instance = 
new Conductor(
$container, $internal, $this->mock(Routing::class));
   117         $this->assertSame(
'rendered', $instance->loginPageHTML(
'foo'));
 
 
 
 
◆ testLogoutText()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testLogoutText  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 120 of file ConductorTest.php.
References $container.
  122         $constraint = $this->mock(Constraint::class);
   123         $component = $this->mock(Component::class);
   125         $container = $this->mockTree(Container::class, [
   126             'refinery' => [
'to' => [
'string' => $constraint]],
   127             'http' => [
'wrapper' => [
'query' => $this->mockMethod(ArrayBasedRequestWrapper::class, 
'retrieve', [
'withdraw_from', $constraint], 
'foo')]],
   128             'ui' => [
'renderer' => $this->mockMethod(Renderer::class, 
'render', [$component], 
'rendered')],
   131         $internal = $this->mockMethod(Internal::class, 
'get', [
'logout-text', 
'foo'], 
static function () use ($component): 
Component {
   135         $instance = 
new Conductor(
$container, $internal, $this->mock(Routing::class));
   137         $this->assertSame(
'rendered', $instance->logoutText());
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testModifyFooter()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testModifyFooter  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 141 of file ConductorTest.php.
References $container, and Vendor\Package\$f.
  143         $footer = $this->mock(Footer::class);
   144         $new_footer = $this->mock(Footer::class);
   146         $modify_footer = 
function (
$f) {
   147             $this->assertInstanceOf(Closure::class, 
$f);
   151         $container = $this->mockTree(Container::class, [
'ui' => [
'factory' => [
'mainControls' => [
'footer' => $new_footer]]]]);
   152         $instance = 
new Conductor(
$container, $this->mockMethod(Internal::class, 
'all', [
'footer'], [
   155         ]), $this->mock(Routing::class));
   157         $this->assertSame($new_footer, $instance->modifyFooter($footer));
 
 
 
 
◆ testOnLogout()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testOnLogout  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 72 of file ConductorTest.php.
References $container.
   74         $constraint = $this->mock(Constraint::class);
    77         $ctrl = $this->mock(ilCtrl::class);
    78         $ctrl->expects(self::once())->method(
'setParameterByClass')->with(
'dummy gui', 
'withdraw_from', 
'foo');
    80         $container = $this->mockTree(Container::class, [
    81             'refinery' => [
'to' => [
'string' => $constraint]],
    82             'http' => [
'wrapper' => [
'query' => $this->mockMethod(ArrayBasedRequestWrapper::class, 
'retrieve', [
'withdraw_consent', $constraint], 
'foo')]],
    86         $internal = $this->mockMethod(Internal::class, 
'get', [
'logout', 
'foo'], 
static function () use (&$called): 
void {
    90         $instance = 
new Conductor(
$container, $internal, $this->mock(Routing::class));
    92         $instance->onLogout(
'dummy gui');
    93         $this->assertTrue($called);
 
 
 
 
◆ testProvide()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testProvide  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 66 of file ConductorTest.php.
   68         $instance = 
new Conductor($this->mock(Container::class), $this->mock(Internal::class), $this->mock(Routing::class));
    69         $this->assertInstanceOf(Provide::class, $instance->provide(
'foo'));
  
 
 
◆ testRedirectAgreeContent()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testRedirectAgreeContent  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 178 of file ConductorTest.php.
References $container.
  180         $this->expectExceptionMessage(
'Not available.');
   181         $routing = $this->mock(Routing::class);
   182         $routing->expects(self::once())->method(
'redirectToOriginalTarget');
   183         $constraint = $this->mock(Constraint::class);
   184         $container = $this->mockTree(Container::class, [
   185             'refinery' => [
'to' => [
'string' => $constraint]],
   186             'http' => [
'wrapper' => [
'query' => $this->mockMethod(ArrayBasedRequestWrapper::class, 
'retrieve', [
'id', $constraint], 
'foo')]],
   188         $internal = $this->mock(Internal::class);
   189         $internal = $this->mockMethod(Internal::class, 
'get', [
'agreement-form', 
'foo'], 
function (
string $g, 
string $cmd): Result {
   190             return new Error(
'Not available.');
   192         $instance = 
new Conductor(
$container, $internal, $routing);
   193         $instance->agreeContent(ilLegalDocumentsAgreementGUI::class, 
'foo');
 
 
 
 
◆ testSelfRegistration()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testSelfRegistration  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 307 of file ConductorTest.php.
  309         $internal = $this->mockMethod(Internal::class, 
'all', [
'self-registration'], [
   310             $this->mock(SelfRegistration::class),
   313         $instance = 
new Conductor($this->mock(Container::class), $internal, $this->mock(Routing::class));
   315         $this->assertInstanceOf(Bundle::class, $instance->selfRegistration());
  
 
 
◆ testUserCanReadInternalMail()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testUserCanReadInternalMail  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 217 of file ConductorTest.php.
References $container.
  220             'foo' => $this->mock(Constraint::class),
   221             'bar' => $this->mock(Constraint::class),
   224         $series = $this->mock(Transformation::class);
   226         $container = $this->mockTree(Container::class, [
   227             'refinery' => [
'in' => $this->mockMethod(
   230                 [array_values($constraints)],
   235         $internal = $this->mockMethod(Internal::class, 
'all', [
'constrain-internal-mail'], $constraints);
   237         $instance = 
new Conductor(
$container, $internal, $this->mock(Routing::class));
   238         $this->assertSame($series, $instance->userCanReadInternalMail());
 
 
 
 
◆ testUserManagementFields()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testUserManagementFields  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 318 of file ConductorTest.php.
  320         $internal = $this->mockMethod(Internal::class, 
'all', [
'user-management-fields'], [
   321             fn() => [
'foo' => 
'bar', 
'baz' => 
'hej'],
   322             fn() => [
'hoo' => 
'har'],
   325         $instance = 
new Conductor($this->mock(Container::class), $internal, $this->mock(Routing::class));
   331         ], $instance->userManagementFields($this->mock(ilObjUser::class)));
  
 
 
◆ testUsersWithHiddenOnlineStatus()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testUsersWithHiddenOnlineStatus  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 203 of file ConductorTest.php.
  205         $internal = $this->mockMethod(Internal::class, 
'all', [
'filter-online-users'], [
   209         $instance = 
new Conductor($this->mock(Container::class), $internal, $this->mock(Routing::class));
   212             [1, 2, 3, 4, 7, 8, 9],
   213             $instance->usersWithHiddenOnlineStatus([1, 2, 3, 4, 5, 6, 7, 8, 9])
  
 
 
◆ testWithdraw()
      
        
          | ILIAS\LegalDocuments\test\ConductorTest::testWithdraw  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 196 of file ConductorTest.php.
References ILIAS\LegalDocuments\test\ConductorTest\agreement().
  198         $main_template = $this->mock(ilGlobalTemplateInterface::class);
   199         $main_template->expects(self::once())->method(
'setContent')->with(
'rendered');
   200         $this->
agreement(
'withdraw', 
'foo', 
'withdraw', $main_template);
 agreement(string $method, string $gui, string $key, ?ilGlobalTemplateInterface $main_template=null)
 
 
 
 
The documentation for this class was generated from the following file: