19 declare(strict_types=1);
    35 require_once __DIR__ . 
'/../../ContainerMock.php';
    44             $this->mock(User::class),
    45             $this->mock(UI::class),
    46             $this->mock(Routing::class),
    47             $this->mock(Settings::class),
    49             $this->mock(Provide::class),
    57             $this->mock(User::class),
    58             $this->mock(UI::class),
    59             $this->mock(Routing::class),
    60             $this->mock(Settings::class),
    62             $this->mock(Provide::class),
    66         $array = $instance->showValidatePasswordMessage();
    67         $this->assertSame(2, count($array));
    68         $this->assertInstanceOf(Component::class, $array[0]);
    69         $this->assertInstanceOf(Component::class, $array[1]);
    75             $this->mockTree(User::class, [
'withdrawalRequested' => [
'value' => 
true]]),
    76             $this->mock(UI::class),
    77             $this->mock(Routing::class),
    78             $this->mock(Settings::class),
    80             $this->mock(Provide::class),
    84         $this->assertTrue($instance->isOnGoing());
    89         $setting = $this->mock(Setting::class);
    90         $setting->expects(self::once())->method(
'update')->with(
true);
    93             $this->mockTree(User::class, [
'cannotAgree' => 
false, 
'neverAgreed' => 
false, 
'withdrawalRequested' => 
$setting]),
    94             $this->mock(UI::class),
    95             $this->mock(Routing::class),
    96             $this->mock(Settings::class),
    98             $this->mock(Provide::class),
   102         $reflection = new \ReflectionClass($instance);
   103         $method = $reflection->getMethod(
'withdrawalRequested');
   104         $method->invoke($instance);
   110             $this->mockTree(User::class, [
'cannotAgree' => 
true, 
'neverAgreed' => 
false]),
   111             $this->mock(UI::class),
   112             $this->mock(Routing::class),
   113             $this->mock(Settings::class),
   115             $this->mock(Provide::class),
   119         $reflection = new \ReflectionClass($instance);
   120         $method = $reflection->getMethod(
'withdrawalRequested');
   121         $method->invoke($instance);
   122         $this->assertTrue(
true);
   127         $main_template = $this->mock(ilGlobalTemplateInterface::class);
   128         $main_template->expects(self::once())->method(
'setOnScreenMessage');
   131             $this->mock(User::class),
   132             $this->mockTree(UI::class, [
'mainTemplate' => $main_template]),
   133             $this->mock(Routing::class),
   134             $this->mock(Settings::class),
   136             $this->mock(Provide::class),
   140         $instance->withdrawalFinished();
   146             $this->mock(User::class),
   147             $this->mock(UI::class),
   148             $this->mock(Routing::class),
   149             $this->mock(Settings::class),
   151             $this->mock(Provide::class),
   155         $this->assertInstanceOf(PageFragment::class, $instance->showWithdraw(
'foo', 
''));
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...