ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTermsOfServiceAcceptanceHistoryGUITest Class Reference

Class ilTermsOfServiceAcceptanceHistoryGUITest. More...

+ Inheritance diagram for ilTermsOfServiceAcceptanceHistoryGUITest:
+ Collaboration diagram for ilTermsOfServiceAcceptanceHistoryGUITest:

Public Member Functions

 setUp ()
 
 testAccessDeniedErrorIsRaisedWhenPermissionsAreMissing ()
 

Protected Attributes

 $tableDataProviderFactory
 
 $tos
 
 $tpl
 
 $ctrl
 
 $lng
 
 $rbacsystem
 
 $error
 
 $uiFactory
 
 $uiRenderer
 
 $request
 
 $criterionTypeFactory
 
- Protected Attributes inherited from ilTermsOfServiceBaseTest
 $dic
 

Additional Inherited Members

- Protected Member Functions inherited from ilTermsOfServiceBaseTest
 setUp ()
 
 getLanguageMock ()
 
 setGlobalVariable (string $name, $value)
 
 assertException (string $exceptionClass)
 
 getCriterionConfig ($value=null)
 

Detailed Description

Member Function Documentation

◆ setUp()

ilTermsOfServiceAcceptanceHistoryGUITest::setUp ( )

Definition at line 50 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

51  {
52  parent::setUp();
53 
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();
65  }

◆ testAccessDeniedErrorIsRaisedWhenPermissionsAreMissing()

ilTermsOfServiceAcceptanceHistoryGUITest::testAccessDeniedErrorIsRaisedWhenPermissionsAreMissing ( )

Definition at line 70 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

References ilTermsOfServiceBaseTest\assertException().

71  {
72  $this->tos
73  ->expects($this->any())
74  ->method('getRefId')
75  ->willReturn(4711);
76 
77  $this->ctrl
78  ->expects($this->any())
79  ->method('getCmd')
80  ->willReturnOnConsecutiveCalls(
81  'showAcceptanceHistory'
82  );
83 
84  $this->rbacsystem
85  ->expects($this->any())
86  ->method('checkAccess')
87  ->willReturn(false);
88 
89  $this->error
90  ->expects($this->any())
91  ->method('raiseError')
92  ->willThrowException(new \ilException('no_permission'));
93 
94  $gui = new \ilTermsOfServiceAcceptanceHistoryGUI(
95  $this->tos,
96  $this->criterionTypeFactory,
97  $this->tpl,
98  $this->ctrl,
99  $this->lng,
100  $this->rbacsystem,
101  $this->error,
102  $this->request,
103  $this->uiFactory,
104  $this->uiRenderer,
105  $this->tableDataProviderFactory
106  );
107 
108  $this->assertException(\ilException::class);
109 
110  $gui->executeCommand();
111  }
assertException(string $exceptionClass)
+ Here is the call graph for this function:

Field Documentation

◆ $criterionTypeFactory

ilTermsOfServiceAcceptanceHistoryGUITest::$criterionTypeFactory
protected

Definition at line 45 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $ctrl

ilTermsOfServiceAcceptanceHistoryGUITest::$ctrl
protected

Definition at line 24 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $error

ilTermsOfServiceAcceptanceHistoryGUITest::$error
protected

Definition at line 33 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $lng

ilTermsOfServiceAcceptanceHistoryGUITest::$lng
protected

Definition at line 27 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $rbacsystem

ilTermsOfServiceAcceptanceHistoryGUITest::$rbacsystem
protected

Definition at line 30 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $request

ilTermsOfServiceAcceptanceHistoryGUITest::$request
protected

Definition at line 42 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $tableDataProviderFactory

ilTermsOfServiceAcceptanceHistoryGUITest::$tableDataProviderFactory
protected

Definition at line 15 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $tos

ilTermsOfServiceAcceptanceHistoryGUITest::$tos
protected

Definition at line 18 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $tpl

ilTermsOfServiceAcceptanceHistoryGUITest::$tpl
protected

Definition at line 21 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $uiFactory

ilTermsOfServiceAcceptanceHistoryGUITest::$uiFactory
protected

Definition at line 36 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.

◆ $uiRenderer

ilTermsOfServiceAcceptanceHistoryGUITest::$uiRenderer
protected

Definition at line 39 of file ilTermsOfServiceAcceptanceHistoryGUITest.php.


The documentation for this class was generated from the following file: