107         $by_trying = $this->mock(ByTrying::class);
   108         $by_trying->method(
'transform')->willReturnOnConsecutiveCalls(
true, 
false);
   110         $settings = $this->mock(ilSetting::class);
   111         $consecutive = [
'dpro_enabled', 
'dpro_no_acceptance'];
   112         $settings->method(
'get')->with(
   113             $this->callback(
function ($value) use (&$consecutive) {
   114                 $this->assertSame(array_shift($consecutive), $value);
   117             $this->identicalTo(
'')
   118         )->willReturnOnConsecutiveCalls(
'true', 
'false');
   120         $container = $this->mockTree(Container::class, [
   121             'settings' => $settings,
   122             'refinery' => [
'byTrying' => $by_trying],
   123             'ctrl' => $this->mock(ilCtrl::class),
   125         $container->method(
'offsetGet')->with(
'ilObjDataCache')->willReturn($this->mock(ilObjectDataCache::class));
   127         $slot = $this->mock(UseSlot::class);
   128         $slot->expects(self::once())->method(
'hasDocuments')->willReturn($slot);
   129         $slot->expects(self::once())->method(
'hasHistory')->willReturn($slot);
   130         $slot->expects(self::once())->method(
'showOnLoginPage')->willReturn($slot);
   131         $slot->expects(self::once())->method(
'canWithdraw')->willReturn($slot);
   132         $slot->expects(self::once())->method(
'hasAgreement')->willReturn($slot);
   133         $slot->expects(self::once())->method(
'showInFooter')->willReturn($slot);
   134         $slot->expects(self::once())->method(
'onSelfRegistration')->willReturn($slot);
   135         $slot->expects(self::once())->method(
'hasOnlineStatusFilter')->willReturn($slot);
   136         $slot->expects(self::once())->method(
'hasUserManagementFields')->willReturn($slot);
   137         $slot->expects(self::once())->method(
'hasPublicApi')->willReturn($slot);
   138         $slot->expects(self::once())->method(
'canReadInternalMails')->willReturn($slot);
   139         $slot->expects(self::once())->method(
'canUseSoapApi')->willReturn($slot);
   143         $this->assertSame($slot, $instance->uses($slot, $this->mock(LazyProvide::class)));