◆ testCertificatesAreActiveAndJavaServerIsActive()
| ilCertificateActiveValidatorTest::testCertificatesAreActiveAndJavaServerIsActive |
( |
| ) |
|
Definition at line 26 of file ilCertificateActiveValidatorTest.php.
26 : void
27 {
28 $settings = $this->getMockBuilder(ilSetting::class)
29 ->disableOriginalConstructor()
30 ->getMock();
31
33 ->with('active')
34 ->willReturn('1');
35
36 $rpcSettings = $this->getMockBuilder(ilRPCServerSettings::class)
37 ->disableOriginalConstructor()
38 ->getMock();
39
40 $rpcSettings->method('isEnabled')
41 ->willReturn(true);
42
44
45 $result = $validator->validate();
46
47 $this->assertTrue($result);
48 }
References ILIAS\LTI\ToolProvider\$settings.
◆ testValidationReturnFalseBecauseGlobalCertificatesAreInactive()
| ilCertificateActiveValidatorTest::testValidationReturnFalseBecauseGlobalCertificatesAreInactive |
( |
| ) |
|
Definition at line 50 of file ilCertificateActiveValidatorTest.php.
50 : void
51 {
52 $settings = $this->getMockBuilder(ilSetting::class)
53 ->disableOriginalConstructor()
54 ->getMock();
55
57 ->with('active')
58 ->willReturn('0');
59
60 $rpcSettings = $this->getMockBuilder(ilRPCServerSettings::class)
61 ->disableOriginalConstructor()
62 ->getMock();
63
64 $rpcSettings
65 ->expects($this->never())
66 ->method('isEnabled')
67 ->willReturn(true);
68
70
71 $result = $validator->validate();
72
73 $this->assertFalse($result);
74 }
References ILIAS\LTI\ToolProvider\$settings.
◆ testValidationReturnFalseBecauseJavaServerIsInactive()
| ilCertificateActiveValidatorTest::testValidationReturnFalseBecauseJavaServerIsInactive |
( |
| ) |
|
Definition at line 76 of file ilCertificateActiveValidatorTest.php.
76 : void
77 {
78 $settings = $this->getMockBuilder(ilSetting::class)
79 ->disableOriginalConstructor()
80 ->getMock();
81
83 ->with('active')
84 ->willReturn('1');
85
86 $rpcSettings = $this->getMockBuilder(ilRPCServerSettings::class)
87 ->disableOriginalConstructor()
88 ->getMock();
89
90 $rpcSettings
91 ->expects($this->once())
92 ->method('isEnabled')
93 ->willReturn(false);
94
96
97 $result = $validator->validate();
98
99 $this->assertFalse($result);
100 }
References ILIAS\LTI\ToolProvider\$settings.
The documentation for this class was generated from the following file: