54 $this->tos = $this->getMockBuilder(\ilObjTermsOfService::class)->disableOriginalConstructor()->getMock();
55 $this->criterionTypeFactory = $this->getMockBuilder(\ilTermsOfServiceCriterionTypeFactoryInterface::class)->disableOriginalConstructor()->getMock();
56 $this->tpl = $this->getMockBuilder(\ilTemplate::class)->disableOriginalConstructor()->setMethods([
'g'])->getMock();
57 $this->ctrl = $this->getMockBuilder(\ilCtrl::class)->disableOriginalConstructor()->getMock();
58 $this->lng = $this->getMockBuilder(\ilLanguage::class)->disableOriginalConstructor()->getMock();
59 $this->rbacsystem = $this->getMockBuilder(\ilRbacSystem::class)->disableOriginalConstructor()->getMock();
60 $this->error = $this->getMockBuilder(\ilErrorHandling::class)->disableOriginalConstructor()->getMock();
61 $this->request = $this->getMockBuilder(ServerRequestInterface::class)->disableOriginalConstructor()->getMock();
62 $this->uiFactory = $this->getMockBuilder(Factory::class)->disableOriginalConstructor()->getMock();
63 $this->uiRenderer = $this->getMockBuilder(Renderer::class)->disableOriginalConstructor()->getMock();
64 $this->tableDataProviderFactory = $this->getMockBuilder(\ilTermsOfServiceTableDataProviderFactory::class)->disableOriginalConstructor()->getMock();
73 ->expects($this->any())
78 ->expects($this->any())
80 ->willReturnOnConsecutiveCalls(
81 'showAcceptanceHistory' 85 ->expects($this->any())
86 ->method(
'checkAccess')
90 ->expects($this->any())
91 ->method(
'raiseError')
92 ->willThrowException(
new \
ilException(
'no_permission'));
94 $gui = new \ilTermsOfServiceAcceptanceHistoryGUI(
96 $this->criterionTypeFactory,
105 $this->tableDataProviderFactory
110 $gui->executeCommand();
assertException(string $exceptionClass)
testAccessDeniedErrorIsRaisedWhenPermissionsAreMissing()
Class ilTermsOfServiceBaseTest.
$tableDataProviderFactory
Class ilTermsOfServiceAcceptanceHistoryGUITest.