◆ setterAndGettersProvider()
static ilChatroomServerSettingsTest::setterAndGettersProvider |
( |
| ) |
|
|
static |
- Returns
- list<array{0: string, 1: callable(mixed): void, 2: mixed}>
Definition at line 31 of file ilChatroomServerSettingsTest.php.
33 $assertIsString =
static function ($actual):
void {
34 self::assertIsString($actual,
'The actual return value is not a type of "string"');
37 $assertIsInteger =
static function ($actual):
void {
38 self::assertIsInt($actual,
'The actual return value is not a type of "int"');
41 $assertIsBool =
static function ($actual):
void {
42 self::assertIsBool($actual,
'The actual return value is not a type of "bool"');
46 [
'port', $assertIsInteger, 7373],
47 [
'protocol', $assertIsString,
'http://'],
48 [
'domain', $assertIsString,
'127.0.0.1'],
50 [
'authKey', $assertIsString,
'cfdf79fc-4133-4f3b-882f-5162a87dc465'],
51 [
'authSecret', $assertIsString,
'f8072a49-0488-411f-be0a-723a762700ba'],
52 [
'clientUrlEnabled', $assertIsBool,
true],
53 [
'clientUrl', $assertIsString,
'http://proxy.localhost'],
54 [
'iliasUrlEnabled', $assertIsBool,
true],
55 [
'iliasUrl', $assertIsString,
'http://proxy.localhost'],
57 [
'instance', $assertIsString,
'123456'],
◆ setUp()
ilChatroomServerSettingsTest::setUp |
( |
| ) |
|
|
protected |
◆ testGenerateClientUrlIfDisabled()
ilChatroomServerSettingsTest::testGenerateClientUrlIfDisabled |
( |
| ) |
|
Definition at line 113 of file ilChatroomServerSettingsTest.php.
References ILIAS\Repository\settings().
115 $protocol =
'http://';
116 $domain =
'127.0.0.1';
117 $clientDomain =
'proxy.localhost';
119 $expected = sprintf(
'%s%s:%s', $protocol, $domain, $port);
121 $this->
settings->setClientUrlEnabled(
false);
122 $this->
settings->setDomain($domain);
124 $this->
settings->setProtocol($protocol);
125 $this->
settings->setClientUrl(sprintf(
'%s:%s', $clientDomain, $port));
127 $this->assertSame($expected, $this->
settings->generateClientUrl());
◆ testGenerateClientUrlIfEnabled()
ilChatroomServerSettingsTest::testGenerateClientUrlIfEnabled |
( |
| ) |
|
Definition at line 96 of file ilChatroomServerSettingsTest.php.
References ILIAS\Repository\settings().
98 $protocol =
'http://';
99 $domain =
'127.0.0.1';
100 $clientDomain =
'proxy.localhost';
102 $expected = sprintf(
'%s%s:%s', $protocol, $clientDomain, $port);
104 $this->
settings->setClientUrlEnabled(
true);
105 $this->
settings->setProtocol($protocol);
106 $this->
settings->setDomain($domain);
108 $this->
settings->setClientUrl(sprintf(
'%s:%s', $clientDomain, $port));
110 $this->assertSame($expected, $this->
settings->generateClientUrl());
◆ testGenerateIliasUrlIfDisabled()
ilChatroomServerSettingsTest::testGenerateIliasUrlIfDisabled |
( |
| ) |
|
Definition at line 147 of file ilChatroomServerSettingsTest.php.
References ILIAS\Repository\settings().
149 $protocol =
'http://';
150 $domain =
'127.0.0.1';
151 $iliasDomain =
'proxy.localhost';
153 $expected = sprintf(
'%s%s:%s', $protocol, $domain, $port);
155 $this->
settings->setIliasUrlEnabled(
false);
156 $this->
settings->setDomain($domain);
158 $this->
settings->setProtocol($protocol);
159 $this->
settings->setIliasUrl(sprintf(
'%s:%s', $iliasDomain, $port));
161 $this->assertSame($expected, $this->
settings->generateIliasUrl());
◆ testGenerateIliasUrlIfEnabled()
ilChatroomServerSettingsTest::testGenerateIliasUrlIfEnabled |
( |
| ) |
|
Definition at line 130 of file ilChatroomServerSettingsTest.php.
References ILIAS\Repository\settings().
132 $protocol =
'http://';
133 $domain =
'127.0.0.1';
134 $iliasDomain =
'proxy.localhost';
136 $expected = sprintf(
'%s%s:%s', $protocol, $iliasDomain, $port);
138 $this->
settings->setIliasUrlEnabled(
true);
139 $this->
settings->setProtocol($protocol);
140 $this->
settings->setDomain($domain);
142 $this->
settings->setIliasUrl(sprintf(
'%s:%s', $iliasDomain, $port));
144 $this->assertSame($expected, $this->
settings->generateIliasUrl());
◆ testGetBaseUrl()
ilChatroomServerSettingsTest::testGetBaseUrl |
( |
| ) |
|
◆ testGetUrl()
ilChatroomServerSettingsTest::testGetUrl |
( |
| ) |
|
◆ testSettersAndGetters()
ilChatroomServerSettingsTest::testSettersAndGetters |
( |
string |
$property, |
|
|
callable |
$assertionCallback, |
|
|
|
$value |
|
) |
| |
- Parameters
-
| callable(mixed) | void $assertionCallback |
mixed | $value | |
Definition at line 66 of file ilChatroomServerSettingsTest.php.
References ILIAS\Repository\settings().
68 $setter =
'set' . ucfirst($property);
69 $getter =
'get' . ucfirst(($property));
71 $this->assertTrue(method_exists($this->
settings, $setter), sprintf(
'The Setter "%s" does not exist', $setter));
72 $this->assertTrue(method_exists($this->
settings, $getter), sprintf(
'The Getter "%s" does not exist', $setter));
75 $actual = $this->
settings->$getter();
77 $this->assertSame($value, $actual, sprintf(
'The expected value "%s" is not equals to "%s"', $value, $actual));
79 $assertionCallback($actual);
◆ $settings
The documentation for this class was generated from the following file: