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