19declare(strict_types=1);
25use PHPUnit\Framework\MockObject\MockObject;
58 protected function setUp(): void
62 $this->tos = $this->getMockBuilder(ilObjTermsOfService::class)->disableOriginalConstructor()->getMock();
63 $this->criterionTypeFactory = $this->getMockBuilder(ilTermsOfServiceCriterionTypeFactoryInterface::class)->disableOriginalConstructor()->getMock();
64 $this->tpl = $this->getMockBuilder(ilGlobalTemplateInterface::class)->getMock();
65 $this->
ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->getMock();
66 $this->
lng = $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock();
67 $this->rbacsystem = $this->getMockBuilder(ilRbacSystem::class)->disableOriginalConstructor()->getMock();
68 $this->
error = $this->getMockBuilder(ilErrorHandling::class)->disableOriginalConstructor()->getMock();
69 $this->
http = $this->getMockBuilder(GlobalHttpState::class)->disableOriginalConstructor()->getMock();
70 $this->
refinery = $this->getMockBuilder(Refinery::class)->disableOriginalConstructor()->getMock();
71 $this->uiFactory = $this->getMockBuilder(Factory::class)->disableOriginalConstructor()->getMock();
72 $this->uiRenderer = $this->getMockBuilder(Renderer::class)->disableOriginalConstructor()->getMock();
73 $this->tableDataProviderFactory = $this->getMockBuilder(ilTermsOfServiceTableDataProviderFactory::class)->disableOriginalConstructor()->getMock();
80 ->willReturnOnConsecutiveCalls(
81 'showAcceptanceHistory'
85 ->method(
'checkAccess')
89 ->method(
'raiseError')
90 ->willThrowException(
new ilException(
'no_permission'));
94 $this->criterionTypeFactory,
104 $this->tableDataProviderFactory
107 $this->expectException(ilException::class);
109 $gui->executeCommand();
Error Handling & global info handling uses PEAR error class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjTermsOfService.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
Class ilTermsOfServiceAcceptanceHistoryGUITest.
ilTermsOfServiceTableDataProviderFactory $tableDataProviderFactory
ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory
testAccessDeniedErrorIsRaisedWhenPermissionsAreMissing()
ilGlobalTemplateInterface $tpl
Class ilTermsOfServiceAcceptanceHistoryGUI.
Class ilTermsOfServiceBaseTest.
Class ilTermsOfServiceTableDataProviderFactory.
Interface GlobalHttpState.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilTermsOfServiceCriterionTypeFactoryInterface.
static http()
Fetches the global http state from ILIAS.