Skip to content

Commit 9df427a

Browse files
committed
unit test fixes
1 parent 572df9a commit 9df427a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/Test/Unit/Config/RelationshipTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ class RelationshipTest extends TestCase
4646
'port' => '6379'
4747
]
4848
],
49+
'valkey' => [
50+
[
51+
'host' => 'cache',
52+
'port' => '6379'
53+
]
54+
],
4955
'elasticsearch' => [
5056
[
5157
'host' => 'elasticsearch',
@@ -90,26 +96,29 @@ public function testGet()
9096
{
9197
$mysqlVersion = '10.4';
9298
$redisVersion = '5.2';
99+
$valkeyVersion = '8.0';
93100
$esVersion = '7.7';
94101
$osVersion = '1.1';
95102
$rmqVersion = '3.5';
96103
$zookeeperVersion = 'latest';
97104
$configWithType = $this->defaultConfigs;
98105
$configWithType['database'][0]['type'] = "mysql:$mysqlVersion";
99106
$configWithType['redis'][0]['type'] = "redis:$redisVersion";
107+
$configWithType['valkey'][0]['type'] = "valkey:$valkeyVersion";
100108
$configWithType['elasticsearch'][0]['type'] = "elasticsearch:$esVersion";
101109
$configWithType['opensearch'][0]['type'] = "opensearch:$osVersion";
102110
$configWithType['rabbitmq'][0]['type'] = "rabbitmq:$rmqVersion";
103111
$configWithType['zookeeper'][0]['type'] = "zookeeper:$zookeeperVersion";
104112

105-
$this->configMock->expects($this->exactly(8))
113+
$this->configMock->expects($this->exactly(9))
106114
->method('hasServiceEnabled')
107115
->willReturnCallback(function ($service) {
108116
static $services = [
109117
ServiceInterface::SERVICE_DB,
110118
ServiceInterface::SERVICE_DB_QUOTE,
111119
ServiceInterface::SERVICE_DB_SALES,
112120
'redis',
121+
'valkey',
113122
'elasticsearch',
114123
'opensearch',
115124
'rabbitmq',
@@ -124,6 +133,7 @@ public function testGet()
124133
true,
125134
true,
126135
true,
136+
true,
127137
true
128138
];
129139

@@ -138,6 +148,7 @@ public function testGet()
138148
$services = [
139149
ServiceInterface::SERVICE_DB,
140150
'redis',
151+
'valkey',
141152
'elasticsearch',
142153
'opensearch',
143154
'rabbitmq',
@@ -147,13 +158,14 @@ public function testGet()
147158
$versions = [
148159
$mysqlVersion,
149160
$redisVersion,
161+
$valkeyVersion,
150162
$esVersion,
151163
$osVersion,
152164
$rmqVersion,
153165
$zookeeperVersion
154166
];
155167

156-
$this->configMock->expects($this->exactly(6))
168+
$this->configMock->expects($this->exactly(7))
157169
->method('getServiceVersion')
158170
->willReturnCallback(function ($service) use (
159171
&$services,

0 commit comments

Comments
 (0)