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