19 declare(strict_types=1);
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();
Interface GlobalHttpState.
An entity that renders components to a string output.
testAccessDeniedErrorIsRaisedWhenPermissionsAreMissing()
ilGlobalTemplateInterface $tpl
Class ilTermsOfServiceBaseTest.
static http()
Fetches the global http state from ILIAS.
Class ilTermsOfServiceTableDataProviderFactory.
ilTermsOfServiceTableDataProviderFactory $tableDataProviderFactory
Class ilTermsOfServiceAcceptanceHistoryGUI.
ilTermsOfServiceCriterionTypeFactoryInterface $criterionTypeFactory
Class ilTermsOfServiceAcceptanceHistoryGUITest.
Error Handling & global info handling uses PEAR error class.
Class ilObjTermsOfService.
Interface ilTermsOfServiceCriterionTypeFactoryInterface.